#include <msp/fs/utils.h>
+#include <msp/strings/format.h>
#include "androidapplicationcomponent.h"
#include "androidmanifestfile.h"
#include "androidresourcefile.h"
apk_sources.push_back(resource_bundle);
const Architecture &arch = package.get_builder().get_current_arch();
- string lib_dir = "//"+name+"/lib/";
+ string lib_dir = format("//%s/lib/", name);
if(arch.get_type()=="arm")
{
lib_dir += "armeabi";
else
lib_dir += arch.get_type();
- string assets_dir = "//"+name+"/assets";
+ string assets_dir = format("//%s/assets", name);
for(Target *t: contents)
{
Target *staged = 0;
#include <stdexcept>
+#include <msp/strings/format.h>
#include "booleanevaluator.h"
using namespace std;
+using namespace Msp;
BooleanEvaluator::BooleanEvaluator(const ValueFunction &f):
func([&f](const string &value, const string *){ return f(value); }),
else if(ops.find(*i)!=string::npos)
push_op(*i);
else
- throw runtime_error("syntax error at "+string(1, *i));
+ throw runtime_error(format("syntax error at %c", *i));
}
}
void BooleanEvaluator::push_op(char op)
{
if(last_was_op!=is_unary(op))
- throw runtime_error("syntax error at "+string(1, op));
+ throw runtime_error(format("syntax error at %c", op));
// TODO Disallow mixing of ! and =/^
if(is_logic(op) && !var_stack.empty())
value_stack.push_back(pop_value());
else if(architecture->is_native())
system_path.push_back("/usr/include");
else
- system_path.push_back("/usr/"+architecture->get_cross_prefix()+"/include");
+ system_path.push_back(format("/usr/%s/include", architecture->get_cross_prefix()));
}
}
}
}
else
- system_path.push_back("/usr/"+architecture->get_cross_prefix()+"/lib");
+ system_path.push_back(format("/usr/%s/lib", architecture->get_cross_prefix()));
}
}