Remove offending boost code which causes warnings in some cases #39

This commit is contained in:
Jason Turner
2012-06-02 17:45:10 -06:00
parent 6c53e08e9b
commit 832df7f9e8
2 changed files with 52 additions and 8 deletions

View File

@@ -80,7 +80,18 @@ std::string get_next_command() {
char *input_raw = readline("eval> ");
if ( input_raw ) {
add_history(input_raw);
retval = boost::trim_copy_if(std::string(input_raw),boost::is_any_of(" \t"));
std::string val(input_raw);
size_t pos = val.find_first_not_of("\t \n");
if (pos != std::string::npos)
{
val.erase(0, pos);
}
pos = val.find_last_not_of("\t \n");
if (pos != std::string::npos)
{
val.erase(pos+1, std::string::npos);
}
retval = val;
::free(input_raw);
}
}