From 99d16b51f142281f7d81cf3f704aff0e97bd1feb Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 16 Mar 2021 23:48:30 +1100 Subject: Convert Platform from a class to a namespace. Does not change callers. Make Assert, DebugPrintf, and similar noexcept so they can be used in noexcept methods and they don't throw. --- qt/ScintillaEditBase/PlatQt.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'qt/ScintillaEditBase') diff --git a/qt/ScintillaEditBase/PlatQt.cpp b/qt/ScintillaEditBase/PlatQt.cpp index b09812236..72f2b8d5f 100644 --- a/qt/ScintillaEditBase/PlatQt.cpp +++ b/qt/ScintillaEditBase/PlatQt.cpp @@ -1211,12 +1211,12 @@ unsigned int Platform::DoubleClickTime() return QApplication::doubleClickInterval(); } -void Platform::DebugDisplay(const char *s) +void Platform::DebugDisplay(const char *s) noexcept { qWarning("Scintilla: %s", s); } -void Platform::DebugPrintf(const char *format, ...) +void Platform::DebugPrintf(const char *format, ...) noexcept { char buffer[2000]; va_list pArguments; @@ -1226,12 +1226,12 @@ void Platform::DebugPrintf(const char *format, ...) Platform::DebugDisplay(buffer); } -bool Platform::ShowAssertionPopUps(bool /*assertionPopUps*/) +bool Platform::ShowAssertionPopUps(bool /*assertionPopUps*/) noexcept { return false; } -void Platform::Assert(const char *c, const char *file, int line) +void Platform::Assert(const char *c, const char *file, int line) noexcept { char buffer[2000]; sprintf(buffer, "Assertion [%s] failed at %s %d", c, file, line); -- cgit v1.2.3