diff --git a/src/ecmascript/spidermonkey/css2xpath.c b/src/ecmascript/spidermonkey/css2xpath.c index 4dc62a3b..2c38955e 100644 --- a/src/ecmascript/spidermonkey/css2xpath.c +++ b/src/ecmascript/spidermonkey/css2xpath.c @@ -6,7 +6,7 @@ #include std::string -implode(const char *const delim, std::vector x) +implode(const char *const delim, std::vector & x) { switch (x.size()) { @@ -38,7 +38,7 @@ explode(char delim, std::string const & s) } std::string -preg_replace(std::string pattern, const char *replacement, std::string subject) +preg_replace(std::string & pattern, const char *replacement, std::string & subject) { return std::regex_replace(subject, std::regex(pattern), replacement); } @@ -48,7 +48,7 @@ preg_replace(std::string pattern, const char *replacement, std::string subject) int main(int argc, char **argv) { -#if 0 +#if 1 std::vector x; for (int i = 2; i < argc; i++) { @@ -57,7 +57,7 @@ main(int argc, char **argv) std::string res = implode(argv[1], x); std::cout << res << "\n"; #endif -#if 0 +#if 1 auto v = explode(' ', "hello world foo bar"); for (auto e : v)