Merge pull request #225 from svost/msvc-C4244
authorCryptoManiac <CryptoManiac@users.noreply.github.com>
Mon, 18 May 2015 18:53:07 +0000 (21:53 +0300)
committerCryptoManiac <CryptoManiac@users.noreply.github.com>
Mon, 18 May 2015 18:53:07 +0000 (21:53 +0300)
Fix some msvc C4244 warnings (possible loss of data), also useless cast (ptime)

1  2 
src/util.cpp

diff --combined src/util.cpp
@@@ -1155,7 -1155,7 +1155,7 @@@ string randomStrGen(int length) 
  
  void createConf()
  {
-     srand(time(NULL));
+     srand(static_cast<unsigned int>(time(NULL)));
  
      ofstream pConf;
  #if BOOST_FILESYSTEM_VERSION >= 3
@@@ -1235,7 -1235,7 +1235,7 @@@ bool RenameOver(boost::filesystem::pat
  {
  #ifdef WIN32
      return MoveFileExA(src.string().c_str(), dest.string().c_str(),
 -                      MOVEFILE_REPLACE_EXISTING);
 +                       MOVEFILE_REPLACE_EXISTING) != 0;
  #else
      int rc = std::rename(src.string().c_str(), dest.string().c_str());
      return (rc == 0);