Mismatch of types: void and return.
[novacoin.git] / src / util.h
index 410debe..6ddc7a6 100644 (file)
@@ -5,11 +5,6 @@
 #ifndef BITCOIN_UTIL_H
 #define BITCOIN_UTIL_H
 
-#if !defined(_MSC_VER) || _MSC_VER > 1700
-#include <inttypes.h>
-#else
-#include "inttypes.h"
-#endif
 
 #include "uint256.h"
 
 
 #include <stdarg.h>
 
+#if defined(__USE_MINGW_ANSI_STDIO)
+#undef __USE_MINGW_ANSI_STDIO // This constant forces MinGW to conduct stupid behavior
+#endif
+#include <inttypes.h>
+
 #include "netbase.h" // for AddTimeData
 
 
@@ -351,14 +351,7 @@ inline int64_t GetTimeMillis()
             boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_milliseconds();
 }
 
-inline std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime)
-{
-    time_t n = nTime;
-    struct tm* ptmTime = gmtime(&n);
-    char pszTime[200];
-    strftime(pszTime, sizeof(pszTime), pszFormat, ptmTime);
-    return pszTime;
-}
+std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime);
 
 static const std::string strTimestampFormat = "%Y-%m-%d %H:%M:%S UTC";
 inline std::string DateTimeStrFormat(int64_t nTime)
@@ -490,7 +483,7 @@ public:
 
     int size() const
     {
-        return vValues.size();
+        return static_cast<int>(vValues.size());
     }
 
     std::vector<T> sorted () const