aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2015-10-28 02:25:45 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2015-10-28 02:30:31 +0100
commit4764f5db9d2c68e517fe2ba1d67dde39987a525c (patch)
tree7b4ab6474a2043d0f10ee10f5429580534342697
parente06c14fb59ee493da5283819420d949a14304ca7 (diff)
parent214de7e54c282f7d452d9b628baaa94e6af51727 (diff)
Merge pull request #6892
214de7e [Trivial] ensure minimal header conventions (Philip Kaufmann)
-rw-r--r--src/bench/bench.cpp2
-rw-r--r--src/bench/bench.h23
-rw-r--r--src/memusage.h2
-rw-r--r--src/policy/policy.h6
4 files changed, 18 insertions, 15 deletions
diff --git a/src/bench/bench.cpp b/src/bench/bench.cpp
index 89c3b0cc2a..6ee3cdc27a 100644
--- a/src/bench/bench.cpp
+++ b/src/bench/bench.cpp
@@ -1,7 +1,9 @@
// Copyright (c) 2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
#include "bench.h"
+
#include <iostream>
#include <sys/time.h>
diff --git a/src/bench/bench.h b/src/bench/bench.h
index bf591a2be6..5ce13c642b 100644
--- a/src/bench/bench.h
+++ b/src/bench/bench.h
@@ -1,8 +1,16 @@
// Copyright (c) 2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#ifndef BITCOIN_BENCH_H
-#define BITCOIN_BENCH_H
+
+#ifndef BITCOIN_BENCH_BENCH_H
+#define BITCOIN_BENCH_BENCH_H
+
+#include <map>
+#include <string>
+
+#include <boost/function.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/stringize.hpp>
// Simple micro-benchmarking framework; API mostly matches a subset of the Google Benchmark
// framework (see https://github.com/google/benchmark)
@@ -25,14 +33,7 @@ static void CODE_TO_TIME(benchmark::State& state)
BENCHMARK(CODE_TO_TIME);
*/
-
-
-#include <boost/function.hpp>
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/stringize.hpp>
-#include <map>
-#include <string>
-
+
namespace benchmark {
class State {
@@ -68,4 +69,4 @@ namespace benchmark {
#define BENCHMARK(n) \
benchmark::BenchRunner BOOST_PP_CAT(bench_, BOOST_PP_CAT(__LINE__, n))(BOOST_PP_STRINGIZE(n), n);
-#endif // BITCOIN_BENCH_H
+#endif // BITCOIN_BENCH_BENCH_H
diff --git a/src/memusage.h b/src/memusage.h
index b475c3313b..e96c5bf038 100644
--- a/src/memusage.h
+++ b/src/memusage.h
@@ -121,4 +121,4 @@ static inline size_t DynamicUsage(const boost::unordered_map<X, Y, Z>& m)
}
-#endif
+#endif // BITCOIN_MEMUSAGE_H
diff --git a/src/policy/policy.h b/src/policy/policy.h
index 7027f1402f..f269e8d476 100644
--- a/src/policy/policy.h
+++ b/src/policy/policy.h
@@ -3,8 +3,8 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#ifndef BITCOIN_POLICY_H
-#define BITCOIN_POLICY_H
+#ifndef BITCOIN_POLICY_POLICY_H
+#define BITCOIN_POLICY_POLICY_H
#include "consensus/consensus.h"
#include "script/interpreter.h"
@@ -59,4 +59,4 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason);
*/
bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs);
-#endif // BITCOIN_POLICY_H
+#endif // BITCOIN_POLICY_POLICY_H