From 71e27a89c1500766c7d3da622192b6cf2f200d44 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Tue, 29 Apr 2014 18:14:34 -0400 Subject: [PATCH] Revert a compiler warning fix from ea6a5a6. --- src/parser/antlr_input.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/parser/antlr_input.cpp b/src/parser/antlr_input.cpp index 127365b78..88b43eb0e 100644 --- a/src/parser/antlr_input.cpp +++ b/src/parser/antlr_input.cpp @@ -372,8 +372,8 @@ std::string parseErrorHelper(const char* lineStart, int charPositionInLine, cons // likely it is also in original message? if so, very likely // we found the right place string word = slice.substr(caretPos, (caretPosOrig - caretPos + 1)); - unsigned messagePosSt = message.find(word); - unsigned messagePosEn = messagePosSt + (caretPosOrig - caretPos); + int messagePosSt = message.find(word); + int messagePosEn = messagePosSt + (caretPosOrig - caretPos); if( messagePosSt < string::npos && (messagePosSt == 0 || !isSimpleChar(message[messagePosSt-1]) ) && (messagePosEn+1 == message.size() || !isSimpleChar(message[messagePosEn+1]) ) ) { @@ -396,8 +396,8 @@ std::string parseErrorHelper(const char* lineStart, int charPositionInLine, cons } string word = slice.substr(nearestWordSt, (nearestWordEn - nearestWordSt + 1)); Debug("friendlyparser") << "[friendlyparser] nearest word = " << word << std::endl; - unsigned messagePosSt = message.find(word); - unsigned messagePosEn = messagePosSt + (nearestWordEn - nearestWordSt + 1); + int messagePosSt = message.find(word); + int messagePosEn = messagePosSt + (nearestWordEn - nearestWordSt + 1); if( messagePosSt < string::npos && (messagePosSt == 0 || !isSimpleChar(message[messagePosSt-1]) ) && (messagePosEn+1 == message.size() || !isSimpleChar(message[messagePosEn+1]) ) ) { -- 2.30.2