fixed gcc shadow warnings
This commit is contained in:
		@@ -32,10 +32,7 @@ int main(int, char*[])
 | 
				
			|||||||
        console->error("Some error message with arg{}..", 1);
 | 
					        console->error("Some error message with arg{}..", 1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Conditional logging example
 | 
					        // Conditional logging example
 | 
				
			||||||
        auto i = 2;
 | 
					        console->info_if(true, "Welcome to spdlog conditional logging!");
 | 
				
			||||||
        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");
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Formatting examples
 | 
					        // Formatting examples
 | 
				
			||||||
        console->warn("Easy padding in numbers like {:08d}", 12);
 | 
					        console->warn("Easy padding in numbers like {:08d}", 12);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -85,7 +85,6 @@ protected:
 | 
				
			|||||||
        if (should_do_colors_)
 | 
					        if (should_do_colors_)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            const std::string& prefix = colors_[msg.level];
 | 
					            const std::string& prefix = colors_[msg.level];
 | 
				
			||||||
            const std::string& reset = colors_[level::off];
 | 
					 | 
				
			||||||
            fwrite(prefix.data(), sizeof(char), prefix.size(), target_file_);
 | 
					            fwrite(prefix.data(), sizeof(char), prefix.size(), target_file_);
 | 
				
			||||||
            fwrite(msg.formatted.data(), sizeof(char), msg.formatted.size(), target_file_);
 | 
					            fwrite(msg.formatted.data(), sizeof(char), msg.formatted.size(), target_file_);
 | 
				
			||||||
            fwrite(reset.data(), sizeof(char), reset.size(), target_file_);
 | 
					            fwrite(reset.data(), sizeof(char), reset.size(), target_file_);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user