diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-09-23 03:51:25 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-09-23 03:51:25 +0000 |
| commit | 2f5b2dd6bb2db2464d9b9c9d95fc0a57559fa331 (patch) | |
| tree | 2d5e8fecedb2d728c026a06ebb1930badd4aeccc /Platforms | |
| parent | Reworked vulkan dynamic heap deallocation to use main release queue (diff) | |
| download | DiligentCore-2f5b2dd6bb2db2464d9b9c9d95fc0a57559fa331.tar.gz DiligentCore-2f5b2dd6bb2db2464d9b9c9d95fc0a57559fa331.zip | |
Reworked message formatting
Diffstat (limited to 'Platforms')
| -rw-r--r-- | Platforms/Android/src/AndroidDebug.cpp | 2 | ||||
| -rw-r--r-- | Platforms/Basic/interface/DebugUtilities.h | 7 | ||||
| -rw-r--r-- | Platforms/Basic/src/BasicPlatformDebug.cpp | 6 | ||||
| -rw-r--r-- | Platforms/Linux/src/LinuxDebug.cpp | 2 | ||||
| -rw-r--r-- | Platforms/UWP/src/UWPDebug.cpp | 2 | ||||
| -rw-r--r-- | Platforms/Win32/src/Win32Debug.cpp | 2 |
6 files changed, 9 insertions, 12 deletions
diff --git a/Platforms/Android/src/AndroidDebug.cpp b/Platforms/Android/src/AndroidDebug.cpp index 6480b614..52658ba0 100644 --- a/Platforms/Android/src/AndroidDebug.cpp +++ b/Platforms/Android/src/AndroidDebug.cpp @@ -22,7 +22,7 @@ */ #include "AndroidDebug.h" -#include "FormatMessage.h" +#include "FormatString.h" #include <android/log.h> #include <csignal> diff --git a/Platforms/Basic/interface/DebugUtilities.h b/Platforms/Basic/interface/DebugUtilities.h index 0ecc6c81..20eee447 100644 --- a/Platforms/Basic/interface/DebugUtilities.h +++ b/Platforms/Basic/interface/DebugUtilities.h @@ -23,7 +23,7 @@ #pragma once -#include "../../../Primitives/interface/FormatMessage.h" +#include "../../../Primitives/interface/FormatString.h" #include "../../../Primitives/interface/Errors.h" #include "BasicPlatformDebug.h" @@ -33,9 +33,8 @@ #define ASSERTION_FAILED(Message, ...)\ do{ \ - Diligent::MsgStream ms; \ - Diligent::FormatMsg( ms, Message, ##__VA_ARGS__);\ - DebugAssertionFailed( ms.str().c_str(), __FUNCTION__, __FILE__, __LINE__); \ + auto msg = Diligent::FormatString(Message, ##__VA_ARGS__);\ + DebugAssertionFailed( msg.c_str(), __FUNCTION__, __FILE__, __LINE__); \ }while(false) # define VERIFY(Expr, Message, ...)\ diff --git a/Platforms/Basic/src/BasicPlatformDebug.cpp b/Platforms/Basic/src/BasicPlatformDebug.cpp index 31e46692..0d649070 100644 --- a/Platforms/Basic/src/BasicPlatformDebug.cpp +++ b/Platforms/Basic/src/BasicPlatformDebug.cpp @@ -22,7 +22,7 @@ */ #include "BasicPlatformDebug.h" -#include "FormatMessage.h" +#include "FormatString.h" #include "BasicFileSystem.h" #include <iostream> @@ -35,9 +35,7 @@ String BasicPlatformDebug :: FormatAssertionFailedMessage( const Char *Message, { String FileName; BasicFileSystem::SplitFilePath( File, nullptr, &FileName ); - std::stringstream msgss; - Diligent::FormatMsg( msgss, "Debug assertion failed in ", Function, "(), file ", FileName, ", line ", Line, ":\n", Message); - return msgss.str(); + return Diligent::FormatString("Debug assertion failed in ", Function, "(), file ", FileName, ", line ", Line, ":\n", Message); } String BasicPlatformDebug::FormatDebugMessage(DebugMessageSeverity Severity, diff --git a/Platforms/Linux/src/LinuxDebug.cpp b/Platforms/Linux/src/LinuxDebug.cpp index 00a6554d..4ab433a4 100644 --- a/Platforms/Linux/src/LinuxDebug.cpp +++ b/Platforms/Linux/src/LinuxDebug.cpp @@ -25,7 +25,7 @@ #include <iostream> #include "LinuxDebug.h" -#include "FormatMessage.h" +#include "FormatString.h" using namespace Diligent; diff --git a/Platforms/UWP/src/UWPDebug.cpp b/Platforms/UWP/src/UWPDebug.cpp index ed78587e..3dca028e 100644 --- a/Platforms/UWP/src/UWPDebug.cpp +++ b/Platforms/UWP/src/UWPDebug.cpp @@ -24,7 +24,7 @@ #include "pch.h" #include "UWPDebug.h" -#include "FormatMessage.h" +#include "FormatString.h" #include <csignal> #define NOMINMAX diff --git a/Platforms/Win32/src/Win32Debug.cpp b/Platforms/Win32/src/Win32Debug.cpp index c1483c4a..7c8aa2b4 100644 --- a/Platforms/Win32/src/Win32Debug.cpp +++ b/Platforms/Win32/src/Win32Debug.cpp @@ -24,7 +24,7 @@ #include "pch.h" #include "Win32Debug.h" -#include "FormatMessage.h" +#include "FormatString.h" #include <csignal> #include <iostream> #include <Windows.h> |
