Skip to content

Commit f3588ac

Browse files
brycehutchingsrpavlik
authored andcommitted
Wrap with !NDEBUG check to match old behavior
1 parent 4a32cef commit f3588ac

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/api_layers/api_dump.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,12 @@ static std::mutex g_record_mutex = {};
7171

7272
// For routing platform_utils.hpp messages.
7373
void LogPlatformUtilsError(const std::string &message) {
74+
#if !defined(NDEBUG)
7475
std::cerr << message << std::endl;
7576
#if defined(XR_OS_WINDOWS)
7677
OutputDebugStringA((message + "\n").c_str());
7778
#endif
79+
#endif
7880
}
7981

8082
// HTML utilities

src/api_layers/core_validation.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,12 @@ bool CoreValidationWriteHtmlFooter() {
213213

214214
// For routing platform_utils.hpp messages.
215215
void LogPlatformUtilsError(const std::string &message) {
216+
#if !defined(NDEBUG)
216217
std::cerr << message << std::endl;
217218
#if defined(XR_OS_WINDOWS)
218219
OutputDebugStringA((message + "\n").c_str());
219220
#endif
221+
#endif
220222
}
221223

222224
// Function to record all the core validation information

0 commit comments

Comments
 (0)