Skip to content

Commit

Permalink
[Trivial] ensure minimal header conventions
Browse files Browse the repository at this point in the history
- ensure header namespaces and end comments are correct
- add missing header end comments
- ensure minimal formatting (add newlines etc.)
  • Loading branch information
Philip Kaufmann committed Oct 27, 2015
1 parent 8f3b3cd commit 214de7e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
2 changes: 2 additions & 0 deletions src/bench/bench.cpp
Original file line number Diff line number Diff line change
@@ -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>

Expand Down
23 changes: 12 additions & 11 deletions src/bench/bench.h
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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 {
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/memusage.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ static inline size_t DynamicUsage(const boost::unordered_map<X, Y, Z>& m)

}

#endif
#endif // BITCOIN_MEMUSAGE_H
6 changes: 3 additions & 3 deletions src/policy/policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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

0 comments on commit 214de7e

Please sign in to comment.