summaryrefslogtreecommitdiff
path: root/zen/sys_error.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2019-10-28 23:21:40 +0000
committerDaniel Wilhelm <shieldwed@outlook.com>2019-10-28 23:21:40 +0000
commit8d6d4e48a61fd974c3fb2a85254f9bedd796a2b7 (patch)
tree65292208a81994782e1c16dd84dfcdcc221d0cd7 /zen/sys_error.h
parentMerge branch '10.16' into 'master' (diff)
parentadd upstream 10.17 (diff)
downloadFreeFileSync-8d6d4e48a61fd974c3fb2a85254f9bedd796a2b7.tar.gz
FreeFileSync-8d6d4e48a61fd974c3fb2a85254f9bedd796a2b7.tar.bz2
FreeFileSync-8d6d4e48a61fd974c3fb2a85254f9bedd796a2b7.zip
Merge branch '10.17' into 'master'10.17
10.17 See merge request opensource-tracking/FreeFileSync!14
Diffstat (limited to 'zen/sys_error.h')
-rw-r--r--zen/sys_error.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/zen/sys_error.h b/zen/sys_error.h
index a087172f..7c746258 100644
--- a/zen/sys_error.h
+++ b/zen/sys_error.h
@@ -47,6 +47,10 @@ private:
do { const ErrorCode ecInternal = getLastError(); throw SysError(formatSystemError(functionName, ecInternal)); } while (false)
+//helper for error checking macros:
+inline bool validatBool(bool b) { return b; }
+inline bool validatBool(void* b) { return b != nullptr; }
+bool validatBool(int) = delete; //catch unintended bool conversions, e.g. HRESULT
bgstack15