aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/PlatWin.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-03-16 23:48:30 +1100
committerNeil <nyamatongwe@gmail.com>2021-03-16 23:48:30 +1100
commit99d16b51f142281f7d81cf3f704aff0e97bd1feb (patch)
tree4c650b9eb3c9299ab303fc918a1c263b3fa4637f /win32/PlatWin.cxx
parent4ac2ffc2fe88b80ad44fe495ff71912bceb4375a (diff)
downloadscintilla-mirror-99d16b51f142281f7d81cf3f704aff0e97bd1feb.tar.gz
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.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r--win32/PlatWin.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 1cae686a2..6fbd05cea 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -3466,14 +3466,14 @@ unsigned int Platform::DoubleClickTime() {
return ::GetDoubleClickTime();
}
-void Platform::DebugDisplay(const char *s) {
+void Platform::DebugDisplay(const char *s) noexcept {
::OutputDebugStringA(s);
}
//#define TRACE
#ifdef TRACE
-void Platform::DebugPrintf(const char *format, ...) {
+void Platform::DebugPrintf(const char *format, ...) noexcept {
char buffer[2000];
va_list pArguments;
va_start(pArguments, format);
@@ -3482,19 +3482,19 @@ void Platform::DebugPrintf(const char *format, ...) {
Platform::DebugDisplay(buffer);
}
#else
-void Platform::DebugPrintf(const char *, ...) {
+void Platform::DebugPrintf(const char *, ...) noexcept {
}
#endif
static bool assertionPopUps = true;
-bool Platform::ShowAssertionPopUps(bool assertionPopUps_) {
+bool Platform::ShowAssertionPopUps(bool assertionPopUps_) noexcept {
const bool ret = assertionPopUps;
assertionPopUps = assertionPopUps_;
return ret;
}
-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%s", c, file, line, assertionPopUps ? "" : "\r\n");
if (assertionPopUps) {