Skip to content

Commit

Permalink
fixed gcc shadow warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
gabime committed Jun 29, 2017
1 parent f06f3f1 commit 4371092
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions example/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ int main(int, char*[])
console->error("Some error message with arg{}..", 1);

// Conditional logging example
auto i = 2;
console->info_if(i < 20, "Welcome to spdlog conditional logging!");
console->warn_if(i != 0, "an important message");
console->critical_if(i != 2, "a false warning which won't show up");
console->info_if(true, "Welcome to spdlog conditional logging!");

// Formatting examples
console->warn("Easy padding in numbers like {:08d}", 12);
Expand Down
1 change: 0 additions & 1 deletion include/spdlog/sinks/ansicolor_sink.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ class ansicolor_sink: public base_sink<Mutex>
if (should_do_colors_)
{
const std::string& prefix = colors_[msg.level];
const std::string& reset = colors_[level::off];
fwrite(prefix.data(), sizeof(char), prefix.size(), target_file_);
fwrite(msg.formatted.data(), sizeof(char), msg.formatted.size(), target_file_);
fwrite(reset.data(), sizeof(char), reset.size(), target_file_);
Expand Down

0 comments on commit 4371092

Please sign in to comment.