- Removed splitq function and tests, migrated code over to the new
  Lexer::split.
This commit is contained in:
Paul Beckingham 2014-04-23 23:20:56 -04:00
parent 611812007a
commit 386bcea60e
5 changed files with 5 additions and 29 deletions

View file

@ -29,6 +29,7 @@
#include <vector>
#include <Alias.h>
#include <Context.h>
#include <Lexer.h>
#include <Tree.h>
#include <text.h>
@ -91,7 +92,7 @@ void Alias::resolve (Tree* tree)
something = true;
std::vector <std::string> words;
splitq (words, context.aliases[raw], ' ');
Lexer::split (words, context.aliases[raw]);
std::vector <std::string>::iterator word;
for (word = words.begin (); word != words.end (); ++word)

View file

@ -30,6 +30,7 @@
#include <vector>
#include <stdlib.h>
#include <Context.h>
#include <Lexer.h>
#include <ViewTask.h>
#include <i18n.h>
#include <text.h>
@ -83,7 +84,7 @@ int CmdCustom::execute (std::string& output)
// Prepend the argument list with those from the report filter.
std::vector <std::string> filterArgs;
splitq (filterArgs, reportFilter, ' ');
Lexer::split (filterArgs, reportFilter);
std::vector <std::string>::reverse_iterator arg;
for (arg = filterArgs.rbegin (); arg != filterArgs.rend (); ++ arg)
{

View file

@ -63,21 +63,6 @@ void wrapText (
////////////////////////////////////////////////////////////////////////////////
// UTF-8
//
// Splits on unicode whitespace, removeѕ quotes.
void splitq (std::vector <std::string>& results, const std::string& input)
{
results.clear ();
std::string token;
Lexer::Type type;
Lexer lex (input);
while (lex.token (token, type))
results.push_back (token);
}
////////////////////////////////////////////////////////////////////////////////
// TODO Obsolete this call.
void splitq (
std::vector<std::string>& results,
const std::string& input,

View file

@ -39,7 +39,6 @@ std::string unquoteText (const std::string&);
int longestWord (const std::string&);
int longestLine (const std::string&);
bool extractLine (std::string&, const std::string&, int, bool, unsigned int&);
void splitq (std::vector<std::string>&, const std::string&);
void splitq (std::vector<std::string>&, const std::string&, const char);
void split (std::vector<std::string>&, const std::string&, const char);
void split (std::vector<std::string>&, const std::string&, const std::string&);