From 47d2a303e982ecb598475baf577b20300bece83d Mon Sep 17 00:00:00 2001 From: monsieurgustav Date: Thu, 14 May 2015 18:22:50 +0200 Subject: [PATCH] compilefix: shipping builds --- OSC/Source/OSC/Private/OscSettings.cpp | 4 ++++ OSC/Source/OSC/Private/Receive/OscDispatcher.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/OSC/Source/OSC/Private/OscSettings.cpp b/OSC/Source/OSC/Private/OscSettings.cpp index 4a61050..e9e4be9 100644 --- a/OSC/Source/OSC/Private/OscSettings.cpp +++ b/OSC/Source/OSC/Private/OscSettings.cpp @@ -61,6 +61,7 @@ void UOscSettings::Send(const uint8 *buffer, int32 length, int32 targetIndex) SendImpl(&_sendSocket.Get(), buffer, length, *address.second); } +#if !NO_LOGGING // Log sent packet if(!LogOSC.IsSuppressed(ELogVerbosity::Verbose)) { @@ -69,11 +70,13 @@ void UOscSettings::Send(const uint8 *buffer, int32 length, int32 targetIndex) const auto encoded = FBase64::Encode(tmp); UE_LOG(LogOSC, Verbose, TEXT("SentAll: %s"), *encoded); } +#endif } else if(targetIndex < _sendAddresses.Num()) { SendImpl(&_sendSocket.Get(), buffer, length, *_sendAddresses[targetIndex].second); +#if !NO_LOGGING // Log sent packet if(!LogOSC.IsSuppressed(ELogVerbosity::Verbose)) { @@ -83,6 +86,7 @@ void UOscSettings::Send(const uint8 *buffer, int32 length, int32 targetIndex) const auto target = _sendAddresses[targetIndex].second->ToString(true); UE_LOG(LogOSC, Verbose, TEXT("SentTo %s: %s"), *target, *encoded); } +#endif } else { diff --git a/OSC/Source/OSC/Private/Receive/OscDispatcher.cpp b/OSC/Source/OSC/Private/Receive/OscDispatcher.cpp index a4471c9..0e80123 100644 --- a/OSC/Source/OSC/Private/Receive/OscDispatcher.cpp +++ b/OSC/Source/OSC/Private/Receive/OscDispatcher.cpp @@ -182,12 +182,14 @@ void UOscDispatcher::Callback(const FArrayReaderPtr& data, const FIPv4Endpoint&) ENamedThreads::GameThread); } +#if !NO_LOGGING // Log received packet if(!LogOSC.IsSuppressed(ELogVerbosity::Verbose)) { const auto encoded = FBase64::Encode(*data); UE_LOG(LogOSC, Verbose, TEXT("Received: %s"), *encoded); } +#endif } void UOscDispatcher::CallbackMainThread()