Renamed _file and _info

This commit is contained in:
Daniel Marjamäki 2018-06-17 07:52:59 +02:00
parent fe0bd8ff6c
commit e8496f4fb5
2 changed files with 14 additions and 14 deletions

View File

@ -583,33 +583,33 @@ std::string ErrorLogger::callStackToString(const std::list<ErrorLogger::ErrorMes
ErrorLogger::ErrorMessage::FileLocation::FileLocation(const Token* tok, const TokenList* tokenList)
: fileIndex(tok->fileIndex()), line(tok->linenr()), col(tok->col()), _file(tokenList->file(tok))
: fileIndex(tok->fileIndex()), line(tok->linenr()), col(tok->col()), mFileName(tokenList->file(tok))
{
}
ErrorLogger::ErrorMessage::FileLocation::FileLocation(const Token* tok, const std::string &info, const TokenList* tokenList)
: fileIndex(tok->fileIndex()), line(tok->linenr()), col(tok->col()), _file(tokenList->file(tok)), _info(info)
: fileIndex(tok->fileIndex()), line(tok->linenr()), col(tok->col()), mFileName(tokenList->file(tok)), mInfo(info)
{
}
std::string ErrorLogger::ErrorMessage::FileLocation::getfile(bool convert) const
{
if (convert)
return Path::toNativeSeparators(_file);
return _file;
return Path::toNativeSeparators(mFileName);
return mFileName;
}
void ErrorLogger::ErrorMessage::FileLocation::setfile(const std::string &file)
{
_file = file;
_file = Path::fromNativeSeparators(_file);
_file = Path::simplifyPath(_file);
mFileName = file;
mFileName = Path::fromNativeSeparators(mFileName);
mFileName = Path::simplifyPath(mFileName);
}
std::string ErrorLogger::ErrorMessage::FileLocation::stringify() const
{
std::ostringstream oss;
oss << '[' << Path::toNativeSeparators(_file);
oss << '[' << Path::toNativeSeparators(mFileName);
if (line != 0)
oss << ':' << line;
oss << ']';

View File

@ -193,11 +193,11 @@ public:
}
FileLocation(const std::string &file, unsigned int aline)
: fileIndex(0), line(aline), col(0), _file(file) {
: fileIndex(0), line(aline), col(0), mFileName(file) {
}
FileLocation(const std::string &file, const std::string &info, unsigned int aline)
: fileIndex(0), line(aline), col(0), _file(file), _info(info) {
: fileIndex(0), line(aline), col(0), mFileName(file), mInfo(info) {
}
FileLocation(const Token* tok, const TokenList* tokenList);
@ -226,15 +226,15 @@ public:
unsigned int col;
std::string getinfo() const {
return _info;
return mInfo;
}
void setinfo(const std::string &i) {
_info = i;
mInfo = i;
}
private:
std::string _file;
std::string _info;
std::string mFileName;
std::string mInfo;
};
ErrorMessage(const std::list<FileLocation> &callStack, const std::string& file1, Severity::SeverityType severity, const std::string &msg, const std::string &id, bool inconclusive);