create defines to support encounter index ratios
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#include <map>
|
||||
|
||||
#include <string>
|
||||
using std::string;
|
||||
using std::string; using std::to_string;
|
||||
|
||||
#include <inja.hpp>
|
||||
using namespace inja;
|
||||
@@ -53,6 +53,13 @@ int main(int argc, char *argv[])
|
||||
return "";
|
||||
});
|
||||
|
||||
env.add_callback("setVarInt", 2, [=](Arguments& args) {
|
||||
string key = args.at(0)->get<string>();
|
||||
string value = to_string(args.at(1)->get<int>());
|
||||
set_custom_var(key, value);
|
||||
return "";
|
||||
});
|
||||
|
||||
env.add_callback("getVar", 1, [=](Arguments& args) {
|
||||
string key = args.at(0)->get<string>();
|
||||
return get_custom_var(key);
|
||||
|
||||
Reference in New Issue
Block a user