X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Futil.h;h=fabcaf93035affeeaf0d660698c8f2cba478f8ea;hb=7a15d4ff67c9a6e3b6b5a63f82f76ffe1937c3b8;hp=3d7ef108b478ee250c09447889b6b6b32b1508be;hpb=86fd7c5af6cf3f907c50cf25ff844cd23e271c70;p=novacoin.git diff --git a/src/util.h b/src/util.h index 3d7ef10..fabcaf9 100644 --- a/src/util.h +++ b/src/util.h @@ -65,7 +65,7 @@ typedef unsigned long long uint64; #endif // This is needed because the foreach macro can't get over the comma in pair -#define PAIRTYPE(t1, t2) pair +#define PAIRTYPE(t1, t2) std::pair // Align by increasing pointer, must have extra space at end of buffer template @@ -132,8 +132,7 @@ inline int myclosesocket(SOCKET& hSocket) return ret; } #define closesocket(s) myclosesocket(s) - -#ifndef GUI +#if !defined(QT_GUI) && !defined(GUI) inline const char* _(const char* psz) { return psz; @@ -148,7 +147,6 @@ inline const char* _(const char* psz) - extern std::map mapArgs; extern std::map > mapMultiArgs; extern bool fDebug; @@ -169,8 +167,8 @@ void RandAddSeed(); void RandAddSeedPerfmon(); int OutputDebugStringF(const char* pszFormat, ...); int my_snprintf(char* buffer, size_t limit, const char* format, ...); -std::string strprintf(const char* format, ...); -bool error(const char* format, ...); +std::string strprintf(const std::string &format, ...); +bool error(const std::string &format, ...); void LogException(std::exception* pex, const char* pszThread); void PrintException(std::exception* pex, const char* pszThread); void PrintExceptionContinue(std::exception* pex, const char* pszThread);