diff --git a/source/glbinding-aux/include/glbinding-aux/logging.h b/source/glbinding-aux/include/glbinding-aux/logging.h index c11eb0f1e..61b99fcec 100644 --- a/source/glbinding-aux/include/glbinding-aux/logging.h +++ b/source/glbinding-aux/include/glbinding-aux/logging.h @@ -98,7 +98,7 @@ GLBINDING_AUX_API void resume(); * @remark * This function is intended to get used by glbinding and not by a user of glbinding */ -GLBINDING_AUX_API void log(LogEntry call); +GLBINDING_AUX_API void log(FunctionCall && call); } } // namespace glbinding::aux diff --git a/source/glbinding-aux/source/logging.cpp b/source/glbinding-aux/source/logging.cpp index 7121453f2..fe2b5b666 100644 --- a/source/glbinding-aux/source/logging.cpp +++ b/source/glbinding-aux/source/logging.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #ifdef GLBINDING_USE_BOOST_THREAD #include @@ -148,7 +149,7 @@ void resume() glbinding::addCallbackMask(CallbackMask::Timestamp | CallbackMask::Logging); } -void log(LogEntry call) +void log(FunctionCall && call) { auto available = false; auto next = g_buffer.nextHead(available); @@ -162,7 +163,7 @@ void log(LogEntry call) assert(!g_buffer.isFull()); delete next; - g_buffer.push(call); + g_buffer.push(new FunctionCall(std::move(call))); } void startWriter(const std::string & filepath) diff --git a/source/glbinding/include/glbinding/Binding.h b/source/glbinding/include/glbinding/Binding.h index 01c62cac8..3d5895508 100644 --- a/source/glbinding/include/glbinding/Binding.h +++ b/source/glbinding/include/glbinding/Binding.h @@ -60,7 +60,7 @@ class GLBINDING_API Binding * @brief * The callback type of a function log callback with parameters and return value */ - using FunctionLogCallback = std::function; + using FunctionLogCallback = std::function; using ContextSwitchCallback = std::function; ///< The signature of the context switch callback diff --git a/source/glbinding/include/glbinding/glbinding.h b/source/glbinding/include/glbinding/glbinding.h index 609aa2589..76ece42f1 100644 --- a/source/glbinding/include/glbinding/glbinding.h +++ b/source/glbinding/include/glbinding/glbinding.h @@ -25,7 +25,7 @@ class FunctionCall; using SimpleFunctionCallback = std::function; ///< The signature of the unresolved callback using FunctionCallback = std::function; ///< The signature of the before and after callbacks -using FunctionLogCallback = std::function; ///< The signature of the log callback +using FunctionLogCallback = std::function; ///< The signature of the log callback using ContextSwitchCallback = std::function; ///< The signature of the context switch callback /** diff --git a/source/glbinding/source/Binding.cpp b/source/glbinding/source/Binding.cpp index 5d8cc3331..f5b3a54a8 100644 --- a/source/glbinding/source/Binding.cpp +++ b/source/glbinding/source/Binding.cpp @@ -138,7 +138,7 @@ void Binding::log(FunctionCall && call) { if (s_logCallback()) { - s_logCallback()(new FunctionCall(std::move(call))); + s_logCallback()(std::move(call)); } }