use string::erase() not clear()
This commit is contained in:
parent
84ebcb5079
commit
346506a31d
@ -1,5 +1,5 @@
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "@(#$Id: textsplit.cpp,v 1.19 2006-01-30 09:28:16 dockes Exp $ (C) 2004 J.F.Dockes";
|
static char rcsid[] = "@(#$Id: textsplit.cpp,v 1.20 2006-02-01 14:18:20 dockes Exp $ (C) 2004 J.F.Dockes";
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -179,9 +179,9 @@ inline bool TextSplit::doemit(bool spanerase, int bp)
|
|||||||
|
|
||||||
// Adjust state
|
// Adjust state
|
||||||
wordpos++;
|
wordpos++;
|
||||||
word.clear();
|
word.erase();
|
||||||
if (spanerase) {
|
if (spanerase) {
|
||||||
span.clear();
|
span.erase();
|
||||||
spanpos = wordpos;
|
spanpos = wordpos;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,8 +212,8 @@ bool TextSplit::text_to_words(const string &in)
|
|||||||
|
|
||||||
setcharclasses();
|
setcharclasses();
|
||||||
|
|
||||||
span.clear();
|
span.erase();
|
||||||
word.clear(); // Current word: no punctuation at all in there
|
word.erase(); // Current word: no punctuation at all in there
|
||||||
number = false;
|
number = false;
|
||||||
wordpos = spanpos = charpos = 0;
|
wordpos = spanpos = charpos = 0;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user