From b4347f60352a7134f95a0f35e74607a167090516 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Tue, 4 Nov 2014 14:34:04 +0100 Subject: [PATCH] minor code style cleanup after recent merges - add a missing license header - correct some header orderings etc. --- src/alert.cpp | 4 ++-- src/crypter.h | 4 ++-- src/eccryptoverify.cpp | 5 +++++ src/eccryptoverify.h | 12 +++++++----- src/ecwrapper.h | 2 +- src/hash.h | 3 ++- src/key.h | 2 +- src/leveldbwrapper.cpp | 3 ++- src/pubkey.cpp | 2 +- src/pubkey.h | 4 ++-- src/script/standard.h | 4 ++-- 11 files changed, 27 insertions(+), 18 deletions(-) diff --git a/src/alert.cpp b/src/alert.cpp index ce8dfbf50..64399a426 100644 --- a/src/alert.cpp +++ b/src/alert.cpp @@ -1,14 +1,14 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers -// Distributed under the MIT/X11 software license, see the accompanying +// Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "alert.h" #include "chainparams.h" #include "clientversion.h" -#include "pubkey.h" #include "net.h" +#include "pubkey.h" #include "timedata.h" #include "ui_interface.h" #include "util.h" diff --git a/src/crypter.h b/src/crypter.h index 4d486c431..b589987c4 100644 --- a/src/crypter.h +++ b/src/crypter.h @@ -1,13 +1,13 @@ // Copyright (c) 2009-2013 The Bitcoin developers -// Distributed under the MIT/X11 software license, see the accompanying +// Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_CRYPTER_H #define BITCOIN_CRYPTER_H #include "allocators.h" -#include "serialize.h" #include "keystore.h" +#include "serialize.h" class uint256; diff --git a/src/eccryptoverify.cpp b/src/eccryptoverify.cpp index 0a904f44b..435154d60 100644 --- a/src/eccryptoverify.cpp +++ b/src/eccryptoverify.cpp @@ -1,3 +1,8 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2009-2014 The Bitcoin developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #include "eccryptoverify.h" namespace { diff --git a/src/eccryptoverify.h b/src/eccryptoverify.h index 7740e31db..da7e80c7c 100644 --- a/src/eccryptoverify.h +++ b/src/eccryptoverify.h @@ -1,13 +1,14 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2009-2013 The Bitcoin developers -// Distributed under the MIT/X11 software license, see the accompanying +// Copyright (c) 2009-2014 The Bitcoin developers +// Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_EC_CRYPTO_VERIFY_H -#define BITCOIN_EC_CRYPTO_VERIFY_H +#ifndef BITCOIN_ECCRYPTOVERIFY_H +#define BITCOIN_ECCRYPTOVERIFY_H #include #include + class uint256; namespace eccrypto { @@ -16,4 +17,5 @@ bool Check(const unsigned char *vch); bool CheckSignatureElement(const unsigned char *vch, int len, bool half); } // eccrypto namespace -#endif + +#endif // BITCOIN_ECCRYPTOVERIFY_H diff --git a/src/ecwrapper.h b/src/ecwrapper.h index 52e9e5dab..3457ca5f5 100644 --- a/src/ecwrapper.h +++ b/src/ecwrapper.h @@ -43,4 +43,4 @@ public: static bool SanityCheck(); }; -#endif // BITCOIN_EC_WRAPPER_H +#endif // BITCOIN_ECWRAPPER_H diff --git a/src/hash.h b/src/hash.h index 53a7672a8..75695160e 100644 --- a/src/hash.h +++ b/src/hash.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The Bitcoin developers -// Distributed under the MIT/X11 software license, see the accompanying +// Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_HASH_H @@ -160,4 +160,5 @@ uint256 SerializeHash(const T& obj, int nType=SER_GETHASH, int nVersion=PROTOCOL unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector& vDataToHash); void BIP32Hash(const unsigned char chainCode[32], unsigned int nChild, unsigned char header, const unsigned char data[32], unsigned char output[64]); + #endif // BITCOIN_HASH_H diff --git a/src/key.h b/src/key.h index b35cf0cad..8c2f44801 100644 --- a/src/key.h +++ b/src/key.h @@ -13,8 +13,8 @@ #include #include -class CPubKey; class CExtPubKey; +class CPubKey; /** * secp256k1: diff --git a/src/leveldbwrapper.cpp b/src/leveldbwrapper.cpp index 8ce3e7b47..70980fede 100644 --- a/src/leveldbwrapper.cpp +++ b/src/leveldbwrapper.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2012-2014 The Bitcoin developers -// Distributed under the MIT/X11 software license, see the accompanying +// Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "leveldbwrapper.h" @@ -7,6 +7,7 @@ #include "util.h" #include + #include #include #include diff --git a/src/pubkey.cpp b/src/pubkey.cpp index 3f16a4b4b..9c6f536f2 100644 --- a/src/pubkey.cpp +++ b/src/pubkey.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2014 The Bitcoin developers -// Distributed under the MIT/X11 software license, see the accompanying +// Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "pubkey.h" diff --git a/src/pubkey.h b/src/pubkey.h index ccf967345..37351cff0 100644 --- a/src/pubkey.h +++ b/src/pubkey.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2009-2013 The Bitcoin developers -// Distributed under the MIT/X11 software license, see the accompanying +// Copyright (c) 2009-2014 The Bitcoin developers +// Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_PUBKEY_H diff --git a/src/script/standard.h b/src/script/standard.h index faa774760..55a27881a 100644 --- a/src/script/standard.h +++ b/src/script/standard.h @@ -6,15 +6,15 @@ #ifndef BITCOIN_SCRIPT_STANDARD_H #define BITCOIN_SCRIPT_STANDARD_H -#include "uint256.h" #include "script/interpreter.h" +#include "uint256.h" #include #include -class CScript; class CKeyID; +class CScript; /** A reference to a CScript: the Hash160 of its serialization (see script.h) */ class CScriptID : public uint160