diff options
author | B Stack <bgstack15@gmail.com> | 2019-10-17 15:59:39 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2019-10-17 15:59:39 -0400 |
commit | 5b604dd360ffc162f163962ccb2b1af109a5f93f (patch) | |
tree | 65292208a81994782e1c16dd84dfcdcc221d0cd7 /zen/sys_error.h | |
parent | Merge branch '10.16' into 'master' (diff) | |
download | FreeFileSync-5b604dd360ffc162f163962ccb2b1af109a5f93f.tar.gz FreeFileSync-5b604dd360ffc162f163962ccb2b1af109a5f93f.tar.bz2 FreeFileSync-5b604dd360ffc162f163962ccb2b1af109a5f93f.zip |
add upstream 10.17
Diffstat (limited to 'zen/sys_error.h')
-rw-r--r-- | zen/sys_error.h | 4 |
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 |