Browse Source

[trivial] Add end of namespace comments

0.15
practicalswift 7 years ago
parent
commit
5a9b508279
  1. 17
      doc/developer-notes.md
  2. 2
      src/base58.cpp
  3. 2
      src/bench/checkblock.cpp
  4. 2
      src/compat/glibc_sanity.cpp
  5. 2
      src/compat/glibcxx_sanity.cpp
  6. 2
      src/dbwrapper.cpp
  7. 2
      src/init.cpp
  8. 4
      src/net_processing.cpp
  9. 2
      src/protocol.cpp
  10. 2
      src/pubkey.cpp
  11. 2
      src/script/bitcoinconsensus.cpp
  12. 4
      src/script/interpreter.cpp
  13. 2
      src/script/sigcache.cpp
  14. 2
      src/script/sign.cpp
  15. 2
      src/script/standard.cpp
  16. 2
      src/test/coins_tests.cpp
  17. 2
      src/test/script_tests.cpp
  18. 2
      src/txmempool.cpp
  19. 2
      src/validation.cpp
  20. 2
      src/versionbits.cpp

17
doc/developer-notes.md

@ -45,7 +45,7 @@ class Class @@ -45,7 +45,7 @@ class Class
return true;
}
}
}
} // namespace foo
```
Doxygen comments
@ -408,6 +408,21 @@ Source code organization @@ -408,6 +408,21 @@ Source code organization
- *Rationale*: Avoids symbol conflicts
- Terminate namespaces with a comment (`// namespace mynamespace`). The comment
should be placed on the same line as the brace closing the namespace, e.g.
```c++
namespace mynamespace {
...
} // namespace mynamespace
namespace {
...
} // namespace
```
- *Rationale*: Avoids confusion about the namespace context
GUI
-----

2
src/base58.cpp

@ -225,7 +225,7 @@ public: @@ -225,7 +225,7 @@ public:
bool operator()(const CNoDestination& no) const { return false; }
};
} // anon namespace
} // namespace
bool CBitcoinAddress::Set(const CKeyID& id)
{

2
src/bench/checkblock.cpp

@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
namespace block_bench {
#include "bench/data/block413567.raw.h"
}
} // namespace block_bench
// These are the two major time-sinks which happen after we have fully received
// a block off the wire, but before we can relay the block on to peers using

2
src/compat/glibc_sanity.cpp

@ -56,7 +56,7 @@ bool sanity_test_fdelt() @@ -56,7 +56,7 @@ bool sanity_test_fdelt()
}
#endif
} // anon namespace
} // namespace
bool glibc_sanity_test()
{

2
src/compat/glibcxx_sanity.cpp

@ -38,7 +38,7 @@ bool sanity_test_list(unsigned int size) @@ -38,7 +38,7 @@ bool sanity_test_list(unsigned int size)
return true;
}
} // anon namespace
} // namespace
// trigger: string::at(x) on an empty string to trigger __throw_out_of_range_fmt.
// test: force std::string to throw an out_of_range exception. Verify that

2
src/dbwrapper.cpp

@ -209,4 +209,4 @@ const std::vector<unsigned char>& GetObfuscateKey(const CDBWrapper &w) @@ -209,4 +209,4 @@ const std::vector<unsigned char>& GetObfuscateKey(const CDBWrapper &w)
return w.obfuscate_key;
}
};
} // namespace dbwrapper_private

2
src/init.cpp

@ -809,7 +809,7 @@ int nUserMaxConnections; @@ -809,7 +809,7 @@ int nUserMaxConnections;
int nFD;
ServiceFlags nLocalServices = NODE_NETWORK;
}
} // namespace
[[noreturn]] static void new_handler_terminate()
{

4
src/net_processing.cpp

@ -122,7 +122,7 @@ namespace { @@ -122,7 +122,7 @@ namespace {
MapRelay mapRelay;
/** Expiration-time ordered list of (expire time, relay map entry) pairs, protected by cs_main). */
std::deque<std::pair<int64_t, MapRelay::iterator>> vRelayExpiration;
} // anon namespace
} // namespace
//////////////////////////////////////////////////////////////////////////////
//
@ -555,7 +555,7 @@ void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vector<con @@ -555,7 +555,7 @@ void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vector<con
}
}
} // anon namespace
} // namespace
bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats) {
LOCK(cs_main);

2
src/protocol.cpp

@ -39,7 +39,7 @@ const char *SENDCMPCT="sendcmpct"; @@ -39,7 +39,7 @@ const char *SENDCMPCT="sendcmpct";
const char *CMPCTBLOCK="cmpctblock";
const char *GETBLOCKTXN="getblocktxn";
const char *BLOCKTXN="blocktxn";
};
} // namespace NetMsgType
/** All known message types. Keep this in the same order as the list of
* messages above and in protocol.h.

2
src/pubkey.cpp

@ -11,7 +11,7 @@ namespace @@ -11,7 +11,7 @@ namespace
{
/* Global secp256k1_context object used for verification. */
secp256k1_context* secp256k1_context_verify = NULL;
}
} // namespace
/** This function is taken from the libsecp256k1 distribution and implements
* DER parsing for ECDSA signatures, while supporting an arbitrary subset of

2
src/script/bitcoinconsensus.cpp

@ -68,7 +68,7 @@ struct ECCryptoClosure @@ -68,7 +68,7 @@ struct ECCryptoClosure
};
ECCryptoClosure instance_of_eccryptoclosure;
}
} // namespace
/** Check that all specified flags are part of the libconsensus interface. */
static bool verify_flags(unsigned int flags)

4
src/script/interpreter.cpp

@ -31,7 +31,7 @@ inline bool set_error(ScriptError* ret, const ScriptError serror) @@ -31,7 +31,7 @@ inline bool set_error(ScriptError* ret, const ScriptError serror)
return false;
}
} // anon namespace
} // namespace
bool CastToBool(const valtype& vch)
{
@ -1164,7 +1164,7 @@ uint256 GetOutputsHash(const CTransaction& txTo) { @@ -1164,7 +1164,7 @@ uint256 GetOutputsHash(const CTransaction& txTo) {
return ss.GetHash();
}
} // anon namespace
} // namespace
PrecomputedTransactionData::PrecomputedTransactionData(const CTransaction& txTo)
{

2
src/script/sigcache.cpp

@ -66,7 +66,7 @@ public: @@ -66,7 +66,7 @@ public:
* signatureCache could be made local to VerifySignature.
*/
static CSignatureCache signatureCache;
}
} // namespace
// To be called once in AppInitMain/BasicTestingSetup to initialize the
// signatureCache.

2
src/script/sign.cpp

@ -400,7 +400,7 @@ public: @@ -400,7 +400,7 @@ public:
}
};
const DummySignatureChecker dummyChecker;
}
} // namespace
const BaseSignatureChecker& DummySignatureCreator::Checker() const
{

2
src/script/standard.cpp

@ -273,7 +273,7 @@ public: @@ -273,7 +273,7 @@ public:
return true;
}
};
}
} // namespace
CScript GetScriptForDestination(const CTxDestination& dest)
{

2
src/test/coins_tests.cpp

@ -88,7 +88,7 @@ public: @@ -88,7 +88,7 @@ public:
size_t& usage() { return cachedCoinsUsage; }
};
}
} // namespace
BOOST_FIXTURE_TEST_SUITE(coins_tests, BasicTestingSetup)

2
src/test/script_tests.cpp

@ -468,7 +468,7 @@ std::string JSONPrettyPrint(const UniValue& univalue) @@ -468,7 +468,7 @@ std::string JSONPrettyPrint(const UniValue& univalue)
}
return ret;
}
}
} // namespace
BOOST_AUTO_TEST_CASE(script_build)
{

2
src/txmempool.cpp

@ -776,7 +776,7 @@ public: @@ -776,7 +776,7 @@ public:
return counta < countb;
}
};
}
} // namespace
std::vector<CTxMemPool::indexed_transaction_set::const_iterator> CTxMemPool::GetSortedDepthAndScore() const
{

2
src/validation.cpp

@ -1491,7 +1491,7 @@ bool AbortNode(CValidationState& state, const std::string& strMessage, const std @@ -1491,7 +1491,7 @@ bool AbortNode(CValidationState& state, const std::string& strMessage, const std
return state.Error(strMessage);
}
} // anon namespace
} // namespace
/**
* Apply the undo operation of a CTxInUndo to the given chain state.

2
src/versionbits.cpp

@ -160,7 +160,7 @@ public: @@ -160,7 +160,7 @@ public:
uint32_t Mask(const Consensus::Params& params) const { return ((uint32_t)1) << params.vDeployments[id].bit; }
};
}
} // namespace
ThresholdState VersionBitsState(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache)
{

Loading…
Cancel
Save