TokenStreamRewriter::replace(const std::string &programName, size_t from, size_t to, const std::string& text) expect a valid reference on std::string object. Not a null pointer.

This commit is contained in:
thomasb8138 2017-02-25 19:11:34 +01:00
parent c3785ce89d
commit 2d390b7a71
1 changed files with 4 additions and 2 deletions

View File

@ -203,11 +203,13 @@ void TokenStreamRewriter::Delete(Token *from, Token *to) {
}
void TokenStreamRewriter::Delete(const std::string &programName, size_t from, size_t to) {
replace(programName, from, to, nullptr);
std::String nullString;
replace(programName, from, to, nullString);
}
void TokenStreamRewriter::Delete(const std::string &programName, Token *from, Token *to) {
replace(programName, from, to, nullptr);
std::String nullString;
replace(programName, from, to, nullString);
}
size_t TokenStreamRewriter::getLastRewriteTokenIndex() {