diff --git a/newcoin.vcxproj b/newcoin.vcxproj index 56aa43c99..32ee35c9e 100644 --- a/newcoin.vcxproj +++ b/newcoin.vcxproj @@ -20,12 +20,14 @@ Application true MultiByte + v110 Application false true MultiByte + v110 @@ -49,13 +51,13 @@ Level3 Disabled BOOST_TEST_ALTERNATIVE_INIT_API;BOOST_TEST_NO_MAIN;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x0501;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - .\src;..\OpenSSL\include;..\boost_1_47_0;..\protobuf-2.4.1\src\ + .\;..\OpenSSL\include;..\boost_1_52_0;..\protobuf\src ProgramDatabase Console true - ..\OpenSSL\lib\VC;..\boost_1_47_0\stage\lib;..\protobuf-2.4.1\vsprojects\Debug + ..\OpenSSL\lib\VC;..\boost_1_52_0\stage\lib;..\protobuf\vsprojects\Debug ssleay32MDd.lib;libeay32MTd.lib;libprotobuf.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) @@ -137,9 +139,7 @@ - - .\;..\OpenSSL\include;..\boost_1_47_0;..\protobuf-2.4.1\src\ - + @@ -175,14 +175,16 @@ - - - - - - - - + + + + + + + + + + @@ -287,7 +289,7 @@ Document - /code/protoc-2.4.1-win32/protoc -I=..\newcoin --cpp_out=\code\newcoin\ ..\newcoin/src/cpp/ripple/ripple.proto + /code/protobuf/protoc -I=..\newcoin --cpp_out=\code\newcoin\ ..\newcoin/src/cpp/ripple/ripple.proto \code\newcoin\src\ripple.pb.h diff --git a/newcoin.vcxproj.filters b/newcoin.vcxproj.filters index 33693e035..0380497b0 100644 --- a/newcoin.vcxproj.filters +++ b/newcoin.vcxproj.filters @@ -33,30 +33,6 @@ - - Source Files\websocketpp - - - Source Files\websocketpp - - - Source Files\websocketpp - - - Source Files\websocketpp - - - Source Files\websocketpp - - - Source Files\websocketpp - - - Source Files\websocketpp - - - Source Files\websocketpp - Source Files\database @@ -318,6 +294,36 @@ Source Files\database + + Source Files\websocketpp + + + Source Files\websocketpp + + + Source Files\websocketpp + + + Source Files\websocketpp + + + Source Files\websocketpp + + + Source Files\websocketpp + + + Source Files\websocketpp + + + Source Files\websocketpp + + + Source Files\websocketpp + + + Source Files\websocketpp + diff --git a/src/cpp/ripple/LedgerConsensus.cpp b/src/cpp/ripple/LedgerConsensus.cpp index 9f9e09945..e5a877b3b 100644 --- a/src/cpp/ripple/LedgerConsensus.cpp +++ b/src/cpp/ripple/LedgerConsensus.cpp @@ -181,9 +181,9 @@ bool TransactionAcquire::takeNodes(const std::list& nodeIDs, } void LCTransaction::setVote(const uint160& peer, bool votesYes) -{ // Tracke a peer's yes/no vote on a particular disputed transaction - std::pair::iterator, bool> res = - mVotes.insert(std::make_pair(peer, votesYes)); +{ // Track a peer's yes/no vote on a particular disputed transaction + std::pair::iterator, bool> res = + mVotes.insert(std::pair(peer, votesYes)); if (res.second) { // new vote diff --git a/src/cpp/ripple/RPC.h b/src/cpp/ripple/RPC.h index f4f75f79f..7d0406a20 100644 --- a/src/cpp/ripple/RPC.h +++ b/src/cpp/ripple/RPC.h @@ -1,3 +1,6 @@ +#ifndef __RPC_h__ +#define __RPC_h__ + #include #include @@ -37,3 +40,5 @@ extern std::string HTTPReply(int nStatus, const std::string& strMsg); extern std::string JSONRPCReply(const Json::Value& result, const Json::Value& error, const Json::Value& id); extern Json::Value JSONRPCError(int code, const std::string& message); + +#endif diff --git a/src/cpp/ripple/TaggedCache.h b/src/cpp/ripple/TaggedCache.h index aee675042..2cdfc708c 100644 --- a/src/cpp/ripple/TaggedCache.h +++ b/src/cpp/ripple/TaggedCache.h @@ -29,9 +29,10 @@ public: typedef c_Key key_type; typedef c_Data data_type; - typedef boost::weak_ptr weak_data_ptr; - typedef boost::shared_ptr data_ptr; - typedef std::pair cache_entry; + typedef boost::weak_ptr weak_data_ptr; + typedef boost::shared_ptr data_ptr; + typedef std::pair cache_entry; + typedef std::pair cache_pair; protected: mutable boost::recursive_mutex mLock; @@ -130,7 +131,7 @@ template void TaggedCache::sweep if (TaggedCachePartition.doLog(lsTRACE) && (mapRemovals || cacheRemovals)) Log(lsTRACE, TaggedCachePartition) << mName << ": cache = " << mCache.size() << "-" << cacheRemovals << - ", map = " << mMap.size() << "-" << mapRemovals; + ", map = " << mMap.size() << "-" << mapRemovals; } template bool TaggedCache::touch(const key_type& key) @@ -156,7 +157,7 @@ template bool TaggedCache::touch } // In map but not cache, put in cache - mCache.insert(std::make_pair(key, std::make_pair(time(NULL), weak_data_ptr(cit->second.second)))); + mCache.insert(cache_pair(key, cache_entry(time(NULL), weak_data_ptr(cit->second.second)))); return true; } @@ -180,7 +181,7 @@ bool TaggedCache::canonicalize(const key_type& key, boost::shared typename boost::unordered_map::iterator mit = mMap.find(key); if (mit == mMap.end()) { // not in map - mCache.insert(std::make_pair(key, std::make_pair(time(NULL), data))); + mCache.insert(cache_pair(key, cache_entry(time(NULL), data))); mMap.insert(std::make_pair(key, data)); return false; } @@ -189,7 +190,7 @@ bool TaggedCache::canonicalize(const key_type& key, boost::shared if (!cachedData) { // in map, but expired. Update in map, insert in cache mit->second = data; - mCache.insert(std::make_pair(key, std::make_pair(time(NULL), data))); + mCache.insert(cache_pair(key, cache_entry(time(NULL), data))); return true; } @@ -208,7 +209,7 @@ bool TaggedCache::canonicalize(const key_type& key, boost::shared cit->second.second = data; } else // no, add to cache - mCache.insert(std::make_pair(key, std::make_pair(time(NULL), data))); + mCache.insert(cache_pair(key, cache_entry(time(NULL), data))); return true; } @@ -229,13 +230,13 @@ boost::shared_ptr TaggedCache::fetch(const key_type& key) mMap.erase(mit); return cachedData; } - + // Valid in map, is it in the cache? typename boost::unordered_map::iterator cit = mCache.find(key); if (cit != mCache.end()) cit->second.first = time(NULL); // Yes, refresh else // No, add to cache - mCache.insert(std::make_pair(key, std::make_pair(time(NULL), cachedData))); + mCache.insert(cache_pair(key, cache_entry(time(NULL), cachedData))); return cachedData; } @@ -257,4 +258,4 @@ bool TaggedCache::retrieve(const key_type& key, c_Data& data) return true; } -#endif +#endif \ No newline at end of file