Switch map definition to initializer list
authorsvost <ya.nowa@yandex.ru>
Wed, 6 Apr 2016 12:01:22 +0000 (15:01 +0300)
committersvost <ya.nowa@yandex.ru>
Wed, 6 Apr 2016 12:01:22 +0000 (15:01 +0300)
src/kernel.cpp
src/rpcrawtransaction.cpp

index 78b6800..29f2c43 100644 (file)
@@ -5,8 +5,6 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include <boost/assign/list_of.hpp>
-
 #include "kernel.h"
 #include "kernel_worker.h"
 #include "txdb.h"
@@ -30,22 +28,22 @@ typedef std::map<int, unsigned int> MapModifierCheckpoints;
 
 // Hard checkpoints of stake modifiers to ensure they are deterministic
 static std::map<int, unsigned int> mapStakeModifierCheckpoints =
-    boost::assign::map_list_of
-        ( 0, 0x0e00670bu )
-        ( 12661, 0x5d84115du )
-        (143990, 0x9c592c78u )
-        (149000, 0x48f2bdc4u )
-        (160000, 0x789df0f0u )
-        (200000, 0x01ec1503u )
-        (221047, 0x0b39ef50u )
-        (243100, 0xe928d83au )
-    ;
+    {
+    {      0, 0x0e00670bu },
+    {  12661, 0x5d84115du },
+    { 143990, 0x9c592c78u },
+    { 149000, 0x48f2bdc4u },
+    { 160000, 0x789df0f0u },
+    { 200000, 0x01ec1503u },
+    { 221047, 0x0b39ef50u },
+    { 243100, 0xe928d83au }
+    };
 
 // Hard checkpoints of stake modifiers to ensure they are deterministic (testNet)
 static std::map<int, unsigned int> mapStakeModifierCheckpointsTestNet =
-    boost::assign::map_list_of
-        ( 0, 0x0e00670bu )
-    ;
+    {
+    { 0, 0x0e00670bu }
+    };
 
 // Pregenerated entropy bits table (from genesis to #9689)
 //
index 5e4fc57..0382c97 100644 (file)
@@ -531,14 +531,14 @@ Value signrawtransaction(const Array& params, bool fHelp)
     if (params.size() > 3 && params[3].type() != null_type)
     {
         static map<string, int> mapSigHashValues =
-            boost::assign::map_list_of
-            (string("ALL"), int(SIGHASH_ALL))
-            (string("ALL|ANYONECANPAY"), int(SIGHASH_ALL|SIGHASH_ANYONECANPAY))
-            (string("NONE"), int(SIGHASH_NONE))
-            (string("NONE|ANYONECANPAY"), int(SIGHASH_NONE|SIGHASH_ANYONECANPAY))
-            (string("SINGLE"), int(SIGHASH_SINGLE))
-            (string("SINGLE|ANYONECANPAY"), int(SIGHASH_SINGLE|SIGHASH_ANYONECANPAY))
-            ;
+            {
+            {"ALL", int(SIGHASH_ALL)},
+            {"ALL|ANYONECANPAY", int(SIGHASH_ALL|SIGHASH_ANYONECANPAY)},
+            {"NONE", int(SIGHASH_NONE)},
+            {"NONE|ANYONECANPAY", int(SIGHASH_NONE|SIGHASH_ANYONECANPAY)},
+            {"SINGLE", int(SIGHASH_SINGLE)},
+            {"SINGLE|ANYONECANPAY", int(SIGHASH_SINGLE|SIGHASH_ANYONECANPAY)}
+            };
         string strHashType = params[3].get_str();
         if (mapSigHashValues.count(strHashType))
             nHashType = mapSigHashValues[strHashType];