From 68eb6dbd6121d2823856a35e2a71ede0d4504f95 Mon Sep 17 00:00:00 2001 From: svost Date: Tue, 16 Feb 2016 16:30:55 +0300 Subject: [PATCH] Remove namespaces from header files --- src/kernel.h | 7 ++----- src/kernel_worker.h | 16 +++++++--------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/kernel.h b/src/kernel.h index c76c00d..464e401 100644 --- a/src/kernel.h +++ b/src/kernel.h @@ -7,8 +7,6 @@ #include "main.h" #include "wallet.h" -using namespace std; - // ChainDB upgrade time extern unsigned int nModifierUpgradeTime; @@ -55,8 +53,7 @@ inline int64_t GetWeight(int64_t nIntervalBeginning, int64_t nIntervalEnd) // // Maximum TimeWeight is 90 days. - return min(nIntervalEnd - nIntervalBeginning - nStakeMinAge, (int64_t)nStakeMaxAge); + return std::min(nIntervalEnd - nIntervalBeginning - nStakeMinAge, (int64_t)nStakeMaxAge); } - -#endif // PPCOIN_KERNEL_H +#endif // PPCOIN_KERNEL_H \ No newline at end of file diff --git a/src/kernel_worker.h b/src/kernel_worker.h index 25e731a..93ee62c 100644 --- a/src/kernel_worker.h +++ b/src/kernel_worker.h @@ -1,10 +1,8 @@ -#ifndef BITCOIN_HERNELWORKER_H -#define BITCOIN_HERNELWORKER_H +#ifndef NOVACOIN_KERNELWORKER_H +#define NOVACOIN_KERNELWORKER_H #include -using namespace std; - class KernelWorker { public: @@ -12,16 +10,16 @@ public: { } KernelWorker(unsigned char *kernel, uint32_t nBits, uint32_t nInputTxTime, int64_t nValueIn, uint32_t nIntervalBegin, uint32_t nIntervalEnd); void Do(); - vector >& GetSolutions(); + std::vector >& GetSolutions(); private: // One way hashing. void Do_generic(); // Kernel solutions. - vector > solutions; + std::vector > solutions; - // Kernel metadaya + // Kernel metadata. uint8_t *kernel; uint32_t nBits; uint32_t nInputTxTime; @@ -33,6 +31,6 @@ private: }; // Scan given kernel for solutions -bool ScanKernelBackward(unsigned char *kernel, uint32_t nBits, uint32_t nInputTxTime, int64_t nValueIn, pair &SearchInterval, pair &solution); +bool ScanKernelBackward(unsigned char *kernel, uint32_t nBits, uint32_t nInputTxTime, int64_t nValueIn, std::pair &SearchInterval, std::pair &solution); -#endif +#endif // NOVACOIN_KERNELWORKER_H \ No newline at end of file -- 1.7.1