Browse Source

Avoid leaving return types or function attributes on their own lines.

0.8
Gregory Maxwell 12 years ago
parent
commit
bdab0cf58c
  1. 3
      src/bitcoinrpc.cpp
  2. 3
      src/main.cpp
  3. 6
      src/rpcrawtransaction.cpp
  4. 6
      src/rpcwallet.cpp
  5. 3
      src/script.cpp
  6. 8
      src/wallet.h

3
src/bitcoinrpc.cpp

@ -104,8 +104,7 @@ Value ValueFromAmount(int64 amount)
return (double)amount / (double)COIN; return (double)amount / (double)COIN;
} }
std::string std::string HexBits(unsigned int nBits)
HexBits(unsigned int nBits)
{ {
union { union {
int32_t nBits; int32_t nBits;

3
src/main.cpp

@ -653,8 +653,7 @@ bool CTxMemPool::remove(CTransaction &tx)
return true; return true;
} }
void void CTxMemPool::clear()
CTxMemPool::clear()
{ {
LOCK(cs); LOCK(cs);
mapTx.clear(); mapTx.clear();

6
src/rpcrawtransaction.cpp

@ -18,8 +18,7 @@ using namespace boost;
using namespace boost::assign; using namespace boost::assign;
using namespace json_spirit; using namespace json_spirit;
void void ScriptPubKeyToJSON(const CScript& scriptPubKey, Object& out)
ScriptPubKeyToJSON(const CScript& scriptPubKey, Object& out)
{ {
txnouttype type; txnouttype type;
vector<CTxDestination> addresses; vector<CTxDestination> addresses;
@ -43,8 +42,7 @@ ScriptPubKeyToJSON(const CScript& scriptPubKey, Object& out)
out.push_back(Pair("addresses", a)); out.push_back(Pair("addresses", a));
} }
void void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry)
TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry)
{ {
entry.push_back(Pair("txid", tx.GetHash().GetHex())); entry.push_back(Pair("txid", tx.GetHash().GetHex()));
entry.push_back(Pair("version", tx.nVersion)); entry.push_back(Pair("version", tx.nVersion));

6
src/rpcwallet.cpp

@ -15,16 +15,14 @@ using namespace std;
int64 nWalletUnlockTime; int64 nWalletUnlockTime;
static CCriticalSection cs_nWalletUnlockTime; static CCriticalSection cs_nWalletUnlockTime;
std::string std::string HelpRequiringPassphrase()
HelpRequiringPassphrase()
{ {
return pwalletMain->IsCrypted() return pwalletMain->IsCrypted()
? "\nrequires wallet passphrase to be set with walletpassphrase first" ? "\nrequires wallet passphrase to be set with walletpassphrase first"
: ""; : "";
} }
void void EnsureWalletIsUnlocked()
EnsureWalletIsUnlocked()
{ {
if (pwalletMain->IsLocked()) if (pwalletMain->IsLocked())
throw JSONRPCError(-13, "Error: Please enter the wallet passphrase with walletpassphrase first."); throw JSONRPCError(-13, "Error: Please enter the wallet passphrase with walletpassphrase first.");

3
src/script.cpp

@ -1127,8 +1127,7 @@ public:
return false; return false;
} }
void void Set(uint256 hash, const std::vector<unsigned char>& vchSig, const std::vector<unsigned char>& pubKey)
Set(uint256 hash, const std::vector<unsigned char>& vchSig, const std::vector<unsigned char>& pubKey)
{ {
// DoS prevention: limit cache size to less than 10MB // DoS prevention: limit cache size to less than 10MB
// (~200 bytes per cache entry times 50,000 entries) // (~200 bytes per cache entry times 50,000 entries)

8
src/wallet.h

@ -319,9 +319,7 @@ public:
typedef std::map<std::string, std::string> mapValue_t; typedef std::map<std::string, std::string> mapValue_t;
static static void ReadOrderPos(int64& nOrderPos, mapValue_t& mapValue)
void
ReadOrderPos(int64& nOrderPos, mapValue_t& mapValue)
{ {
if (!mapValue.count("n")) if (!mapValue.count("n"))
{ {
@ -332,9 +330,7 @@ ReadOrderPos(int64& nOrderPos, mapValue_t& mapValue)
} }
static static void WriteOrderPos(const int64& nOrderPos, mapValue_t& mapValue)
void
WriteOrderPos(const int64& nOrderPos, mapValue_t& mapValue)
{ {
if (nOrderPos == -1) if (nOrderPos == -1)
return; return;

Loading…
Cancel
Save