Skip to content

Commit

Permalink
Run clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
joajfreitas committed Sep 23, 2024
1 parent a26e923 commit 7d663cd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
22 changes: 11 additions & 11 deletions plotjuggler_plugins/ParserProtobuf/error_collectors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,38 @@
#include <QDebug>

void FileErrorCollector::RecordError(const absl::string_view filename, int line, int,
const absl::string_view message)
const absl::string_view message)
{
auto msg = QString("File: [%1] Line: [%2] Message: %3\n\n")
.arg(QString::fromStdString(std::string{filename}))
.arg(QString::fromStdString(std::string{ filename }))
.arg(line)
.arg(QString::fromStdString(std::string{message}));
.arg(QString::fromStdString(std::string{ message }));

_errors.push_back(msg);
}

void FileErrorCollector::RecordWarning(const absl::string_view filename, int line, int,
const absl::string_view message)
const absl::string_view message)
{
auto msg = QString("Warning [%1] line %2: %3")
.arg(QString::fromStdString(std::string{filename}))
.arg(QString::fromStdString(std::string{ filename }))
.arg(line)
.arg(QString::fromStdString(std::string{message}));
.arg(QString::fromStdString(std::string{ message }));
qDebug() << msg;
}

void IoErrorCollector::RecordError(int line, google::protobuf::io::ColumnNumber,
const absl::string_view message)
const absl::string_view message)
{
_errors.push_back(QString("Line: [%1] Message: %2\n")
.arg(line)
.arg(QString::fromStdString(std::string{message})));
.arg(line)
.arg(QString::fromStdString(std::string{ message })));
}

void IoErrorCollector::RecordWarning(int line, google::protobuf::io::ColumnNumber column,
const absl::string_view message)
const absl::string_view message)
{
qDebug() << QString("Line: [%1] Message: %2\n")
.arg(line)
.arg(QString::fromStdString(std::string{message}));
.arg(QString::fromStdString(std::string{ message }));
}
8 changes: 4 additions & 4 deletions plotjuggler_plugins/ParserProtobuf/error_collectors.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ class IoErrorCollector : public google::protobuf::io::ErrorCollector
{
public:
void RecordError(int line, google::protobuf::io::ColumnNumber column,
const absl::string_view message) override;
const absl::string_view message) override;

void RecordWarning(int line, google::protobuf::io::ColumnNumber column,
const absl::string_view message) override;
const absl::string_view message) override;

const QStringList& errors()
{
Expand All @@ -30,10 +30,10 @@ class FileErrorCollector : public google::protobuf::compiler::MultiFileErrorColl
{
public:
void RecordError(const absl::string_view filename, int line, int,
const absl::string_view message) override;
const absl::string_view message) override;

void RecordWarning(const absl::string_view filename, int line, int,
const absl::string_view message) override;
const absl::string_view message) override;

const QStringList& errors()
{
Expand Down

0 comments on commit 7d663cd

Please sign in to comment.