Skip to content
This repository has been archived by the owner on Jun 29, 2024. It is now read-only.

Commit

Permalink
Fix codacy issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Gashmob committed Aug 1, 2023
1 parent a98eae1 commit 0b75b3b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/message/Error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* SOFTWARE.
*/
#include "Error.h"
#include <utility>

namespace filc::message {
auto BasicError::print(std::ostream &out) -> std::ostream & {
Expand All @@ -36,14 +37,14 @@ namespace filc::message {
}

Error::Error(filc::message::LEVEL level, std::string content, filc::utils::Position *position)
: Message(level, content), _position(position) {}
: Message(level, std::move(content)), _position(position) {}

auto Error::print(std::ostream &out) -> std::ostream & {
if (_printed) {
return out;
}

out << "\033[1;31mERROR:\033[0m " << _content << std::endl;
out << "\033[1;31mERROR:\033[0m " << _content << '\n';
out << _position->dump("\033[1;31m");

return out;
Expand Down

0 comments on commit 0b75b3b

Please sign in to comment.