tiny beautification

This commit is contained in:
2021-02-17 00:10:39 +01:00
parent fb23b20473
commit 4a867d3c22
2 changed files with 10 additions and 10 deletions

10
ml.cpp
View File

@@ -15,7 +15,6 @@
#include <sstream>
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <ctime>
@@ -47,7 +46,7 @@
// Convert an object to a string using a stringstream conveniently
// Convert an object to a string using a string stream conveniently
#define to_string(x) static_cast<std::ostringstream>((std::ostringstream() << std::dec << x )).str()
// Replace a substring with a replacement string in a source string
@@ -1350,8 +1349,8 @@ namespace builtin {
eval_args(args, env);
if (args.size() != 1)
throw MlError(MlValue(FLOAT_TYPE, cast_to_float), env,
args.size() > 1 ? TOO_MANY_ARGS : TOO_FEW_ARGS);
throw MlError(MlValue(FLOAT_TYPE, cast_to_float), env, args.size() > 1 ? TOO_MANY_ARGS : TOO_FEW_ARGS);
return args[0].cast_to_float();
}
@@ -1360,7 +1359,8 @@ namespace builtin {
eval_args(args, env);
if (args.size() != 1)
throw MlError(MlValue(INT_TYPE, cast_to_int), env, args.size() > 1 ? TOO_MANY_ARGS : TOO_FEW_ARGS);
throw MlError(MlValue(INT_TYPE, cast_to_int), env, args.size() > 1 ? TOO_MANY_ARGS : TOO_FEW_ARGS);
return args[0].cast_to_int();
}