summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/md5.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2023-04-13 05:49:05 +1000
committer Vas Crabb <vas@vastheman.com>2023-04-13 05:49:05 +1000
commitb6b6c9b15c34471fd3938bdb9715754f09f10e00 (patch)
treeb77d63379d6fb1305ca64342f7e5ca7f9aff3d3c /src/lib/util/md5.cpp
parent81dd75f7d7db2967d00075bd443c85e8b042251d (diff)
Allow loading PNG/JPEG/MS DIB bitmaps from Lua, and cleanup.
Use VirtualAlloc rather than VirtualProtect on Windows to change page protection, as the latter can cause severe performance issues with some antivirus software. Added noexcept to lots of hash- and bitmap-related things, and added a little more error checking. Yes, I realise it will abort if an allocation fails while printing a log message, but if you get to that point, you're probably screwed already.
Diffstat (limited to 'src/lib/util/md5.cpp')
-rw-r--r--src/lib/util/md5.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/util/md5.cpp b/src/lib/util/md5.cpp
index 3e26d0c5b07..ca36792220e 100644
--- a/src/lib/util/md5.cpp
+++ b/src/lib/util/md5.cpp
@@ -22,9 +22,10 @@
* Still in the public domain.
*/
+#include "md5.h"
+
#include <cstring> /* for memcpy() */
-#include "md5.h"
#ifndef LSB_FIRST
void