Commit d02aaa1b authored by Davis King's avatar Davis King

Changed code slightly to avoid a compiler error that you get from

some versions of visual studio 2005.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403566
parent 0e2f88fe
...@@ -68,6 +68,17 @@ namespace dlib ...@@ -68,6 +68,17 @@ namespace dlib
const uint64 thread_id const uint64 thread_id
); );
template <
typename T
>
void set_all_logging_output_hooks (
T& object,
void (T::*hook_)(const std::string& logger_name,
const log_level& l,
const uint64 thread_id,
const char* message_to_log)
);
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
class logger class logger
...@@ -586,7 +597,7 @@ namespace dlib ...@@ -586,7 +597,7 @@ namespace dlib
) )
{ {
logger::hook_mfp hook; logger::hook_mfp hook;
hook.set(object, hook_); hook.set<T>(object, hook_);
logger::global_data& gd = logger::get_global_data(); logger::global_data& gd = logger::get_global_data();
auto_mutex M(gd.m); auto_mutex M(gd.m);
...@@ -624,6 +635,8 @@ namespace dlib ...@@ -624,6 +635,8 @@ namespace dlib
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
} }
#ifdef NO_MAKEFILE #ifdef NO_MAKEFILE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment