atyle
This commit is contained in:
		@@ -80,7 +80,10 @@ int main(int, char*[])
 | 
				
			|||||||
        err_handler_example();
 | 
					        err_handler_example();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Apply a function on all registered loggers
 | 
					        // Apply a function on all registered loggers
 | 
				
			||||||
		spd::apply_all([&](std::shared_ptr<spdlog::logger> l) {l->info("End of example."); });
 | 
					        spd::apply_all([&](std::shared_ptr<spdlog::logger> l)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            l->info("End of example.");
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Release and close all loggers
 | 
					        // Release and close all loggers
 | 
				
			||||||
        spdlog::drop_all();
 | 
					        spdlog::drop_all();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -32,7 +32,10 @@ TEST_CASE("apply_all" "[registry]")
 | 
				
			|||||||
    spdlog::register_logger(logger2);
 | 
					    spdlog::register_logger(logger2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    int counter = 0;
 | 
					    int counter = 0;
 | 
				
			||||||
	spdlog::apply_all([&counter](std::shared_ptr<spdlog::logger> l){counter++;});
 | 
					    spdlog::apply_all([&counter](std::shared_ptr<spdlog::logger> l)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        counter++;
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
    REQUIRE(counter == 2);
 | 
					    REQUIRE(counter == 2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    counter = 0;
 | 
					    counter = 0;
 | 
				
			||||||
@@ -40,7 +43,8 @@ TEST_CASE("apply_all" "[registry]")
 | 
				
			|||||||
    spdlog::apply_all([&counter](std::shared_ptr<spdlog::logger> l)
 | 
					    spdlog::apply_all([&counter](std::shared_ptr<spdlog::logger> l)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        REQUIRE(l->name() == tested_logger_name);
 | 
					        REQUIRE(l->name() == tested_logger_name);
 | 
				
			||||||
		counter++; }
 | 
					        counter++;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
                     );
 | 
					                     );
 | 
				
			||||||
    REQUIRE(counter == 1);
 | 
					    REQUIRE(counter == 1);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user