diff --git a/src/makefile.unix b/src/makefile.unix index 0648289..dbcebbe 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -170,6 +170,7 @@ OBJS= \ obj/scrypt-x86.o \ obj/scrypt-x86_64.o \ obj/smessage.o \ + obj/lz4.o \ obj/onion_v3.o \ obj/tor_process.o \ obj/tor_embed_hooks.o \ @@ -243,6 +244,13 @@ obj/%.o: %.c -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ rm -f $(@:%.o=%.d) +obj/lz4.o: lz4/lz4.c + $(CXX) -c $(xCXXFLAGS) -fpermissive -MMD -MF $(@:%.o=%.d) -o $@ $< + @cp $(@:%.o=%.d) $(@:%.o=%.P); \ + sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//'\ + -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ + rm -f $(@:%.o=%.d) + obj/tor_embed_hooks.o: tor_embed_hooks.cpp $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< @cp $(@:%.o=%.d) $(@:%.o=%.P); \ diff --git a/src/miner.cpp b/src/miner.cpp index c782ed6..050d001 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -93,15 +93,15 @@ public: { if (byFee) { - if (a.get<1>() == b.get<1>()) - return a.get<0>() < b.get<0>(); - return a.get<1>() < b.get<1>(); + if (std::get<1>(a) == std::get<1>(b)) + return std::get<0>(a) < std::get<0>(b); + return std::get<1>(a) < std::get<1>(b); } else { - if (a.get<0>() == b.get<0>()) - return a.get<1>() < b.get<1>(); - return a.get<0>() < b.get<0>(); + if (std::get<0>(a) == std::get<0>(b)) + return std::get<1>(a) < std::get<1>(b); + return std::get<0>(a) < std::get<0>(b); } } }; @@ -259,9 +259,9 @@ CBlock* CreateNewBlock(CWallet* pwallet, bool fProofOfStake, int64_t* pFees) while (!vecPriority.empty()) { // Take highest priority transaction off the priority queue: - double dPriority = vecPriority.front().get<0>(); - double dFeePerKb = vecPriority.front().get<1>(); - CTransaction& tx = *(vecPriority.front().get<2>()); + double dPriority = std::get<0>(vecPriority.front()); + double dFeePerKb = std::get<1>(vecPriority.front()); + CTransaction& tx = *(std::get<2>(vecPriority.front())); std::pop_heap(vecPriority.begin(), vecPriority.end(), comparer); vecPriority.pop_back(); diff --git a/src/script.cpp b/src/script.cpp index 9c1d827..827c072 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -6,7 +6,6 @@ #include using namespace std; -using namespace boost; #include "script.h" #include "keystore.h" diff --git a/src/smessage.cpp b/src/smessage.cpp index b58b464..60ed105 100644 --- a/src/smessage.cpp +++ b/src/smessage.cpp @@ -54,7 +54,7 @@ Notes: #include "txdb.h" -#include "lz4/lz4.c" +#include "lz4/lz4.h" #include "xxhash/xxhash.h" #include "xxhash/xxhash.c" diff --git a/triangles-qt.pro b/triangles-qt.pro index 70ad316..40ce84a 100644 --- a/triangles-qt.pro +++ b/triangles-qt.pro @@ -331,6 +331,7 @@ SOURCES += src/qt/triangles.cpp src/qt/trianglesgui.cpp \ src/version.cpp \ src/sync.cpp \ src/smessage.cpp \ + src/lz4/lz4.c \ src/util.cpp \ src/netbase.cpp \ src/key.cpp \