2
0
mirror of https://github.com/boostorg/spirit.git synced 2026-01-19 04:42:11 +00:00

Removed unneeded lexical_cast usages

This commit is contained in:
Nikita Kniazev
2018-12-27 19:37:02 +03:00
parent e07ce69363
commit 54ca101440
6 changed files with 15 additions and 19 deletions

View File

@@ -136,12 +136,12 @@ namespace client { namespace code_gen
case op_load:
line += " op_load ";
line += boost::lexical_cast<std::string>(locals[*pc++]);
line += locals[*pc++];
break;
case op_store:
line += " op_store ";
line += boost::lexical_cast<std::string>(locals[*pc++]);
line += locals[*pc++];
break;
case op_int:

View File

@@ -135,12 +135,12 @@ namespace client { namespace code_gen
case op_load:
line += " op_load ";
line += boost::lexical_cast<std::string>(locals[*pc++]);
line += locals[*pc++];
break;
case op_store:
line += " op_store ";
line += boost::lexical_cast<std::string>(locals[*pc++]);
line += locals[*pc++];
break;
case op_int:

View File

@@ -136,12 +136,12 @@ namespace client { namespace code_gen
case op_load:
line += " op_load ";
line += boost::lexical_cast<std::string>(locals[*pc++]);
line += locals[*pc++];
break;
case op_store:
line += " op_store ";
line += boost::lexical_cast<std::string>(locals[*pc++]);
line += locals[*pc++];
break;
case op_int:

View File

@@ -135,12 +135,12 @@ namespace client { namespace code_gen
case op_load:
line += " op_load ";
line += boost::lexical_cast<std::string>(locals[*pc++]);
line += locals[*pc++];
break;
case op_store:
line += " op_store ";
line += boost::lexical_cast<std::string>(locals[*pc++]);
line += locals[*pc++];
break;
case op_int:

View File

@@ -8,7 +8,6 @@
#include "vm.hpp"
#include <boost/variant/apply_visitor.hpp>
#include <boost/assert.hpp>
#include <boost/lexical_cast.hpp>
#include <iostream>
#include <set>
#include <iostream>
@@ -136,17 +135,17 @@ namespace client { namespace code_gen
case op_load:
line += " op_load ";
line += boost::lexical_cast<std::string>(locals[*pc++]);
line += locals[*pc++];
break;
case op_store:
line += " op_store ";
line += boost::lexical_cast<std::string>(locals[*pc++]);
line += locals[*pc++];
break;
case op_int:
line += " op_int ";
line += boost::lexical_cast<std::string>(*pc++);
line += std::to_string(*pc++);
break;
case op_true:
@@ -164,7 +163,7 @@ namespace client { namespace code_gen
if (pos == code.size())
line += "end";
else
line += boost::lexical_cast<std::string>(pos);
line += std::to_string(pos);
jumps.insert(pos);
}
break;
@@ -176,14 +175,14 @@ namespace client { namespace code_gen
if (pos == code.size())
line += "end";
else
line += boost::lexical_cast<std::string>(pos);
line += std::to_string(pos);
jumps.insert(pos);
}
break;
case op_stk_adj:
line += " op_stk_adj ";
line += boost::lexical_cast<std::string>(*pc++);
line += std::to_string(*pc++);
break;
}
lines[address] = line;

View File

@@ -19,7 +19,6 @@
#include <boost/spirit/home/support/detail/lexer/debug.hpp>
#include <boost/spirit/home/lex/lexer/lexertl/static_version.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/scoped_array.hpp>
///////////////////////////////////////////////////////////////////////////////
@@ -156,9 +155,7 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
os_ << "struct lexer" << suffix << "\n{\n";
os_ << " // version number and feature-set of compatible static lexer engine\n";
os_ << " enum\n";
os_ << " {\n static_version = "
<< boost::lexical_cast<std::basic_string<Char> >(SPIRIT_STATIC_LEXER_VERSION)
<< ",\n";
os_ << " {\n static_version = " << SPIRIT_STATIC_LEXER_VERSION << ",\n";
os_ << " supports_bol = " << std::boolalpha << bol << ",\n";
os_ << " supports_eol = " << std::boolalpha << eol << "\n";
os_ << " };\n\n";