From d4af25c52a28b93484ffb55e0a8027bc4ce7856f Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:21:59 +0200 Subject: 5.9 --- zen/last_error.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'zen/last_error.h') diff --git a/zen/last_error.h b/zen/last_error.h index 356192ab..72d54d48 100644 --- a/zen/last_error.h +++ b/zen/last_error.h @@ -76,18 +76,18 @@ ErrorCode getLastError() #ifdef FFS_WIN return ::GetLastError(); #elif defined FFS_LINUX - return errno; + return errno; //don't use "::", errno is a macro! #endif } inline std::wstring getLastErrorFormatted(ErrorCode lastError) { -#ifdef FFS_WIN //determine error code if none was specified if (lastError == 0) - lastError = ::GetLastError(); + lastError = getLastError(); +#ifdef FFS_WIN std::wstring output = _("Windows Error Code %x:"); replace(output, L"%x", numberTo(lastError)); @@ -108,10 +108,6 @@ std::wstring getLastErrorFormatted(ErrorCode lastError) return output; #elif defined FFS_LINUX - //determine error code if none was specified - if (lastError == 0) - lastError = errno; //don't use "::", errno is a macro! - std::wstring output = _("Linux Error Code %x:"); replace(output, L"%x", numberTo(lastError)); -- cgit