Skip to content

Commit

Permalink
Edits
Browse files Browse the repository at this point in the history
  • Loading branch information
farhangnaderi committed Nov 18, 2024
1 parent 632442c commit ba2bbbd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
10 changes: 0 additions & 10 deletions plotjuggler_plugins/ParserProtobuf/error_collectors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@ void FileErrorCollector::AddWarning(const std::string& filename, int line, int,
qDebug() << msg;
}

void FileErrorCollector::RecordError(absl::string_view filename, int line, int column,
absl::string_view message)
{
QString errorMessage = QString("Error in file: %1 at line: %2, column: %3: %4")
.arg(QString::fromStdString(std::string(filename)))
.arg(line)
.arg(column)
.arg(QString::fromStdString(std::string(message)));
_errors << errorMessage;
}
void IoErrorCollector::AddError(int line, google::protobuf::io::ColumnNumber,
const std::string& message)
{
Expand Down
12 changes: 2 additions & 10 deletions plotjuggler_plugins/ParserProtobuf/error_collectors.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@

#include <google/protobuf/io/tokenizer.h>
#include <google/protobuf/compiler/importer.h>

#include <QStringList>

class IoErrorCollector : public google::protobuf::io::ErrorCollector
{
public:
void AddError(int line, google::protobuf::io::ColumnNumber column,
const std::string& message);
const std::string& message);

void AddWarning(int line, google::protobuf::io::ColumnNumber column,
const std::string& message);
const std::string& message);

const QStringList& errors()
{
Expand All @@ -34,20 +33,13 @@ class FileErrorCollector : public google::protobuf::compiler::MultiFileErrorColl
void AddWarning(const std::string& filename, int line, int,
const std::string& message);

const QStringList& errors() const
const QStringList& errors()
{
return _errors;
}

// Accessor for the collected warnings
const QStringList& warnings() const
{
return _warnings;
}

private:
QStringList _errors;
QStringList _warnings;
};

#endif // ERROR_COLLECTORS_H

0 comments on commit ba2bbbd

Please sign in to comment.