From c8ccf301033fe63c3481fb618740eb36f0f175ad Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Wed, 30 Apr 2014 14:45:24 +0200 Subject: [PATCH] use standard __func__ instead of __PRETTY_FUNCTION__ --- src/main.cpp | 8 ++++---- src/main.h | 2 +- src/txdb.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 2b37d3774..271b42543 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1039,11 +1039,11 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock fseek(file, postx.nTxOffset, SEEK_CUR); file >> txOut; } catch (std::exception &e) { - return error("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what()); + return error("%s : Deserialize or I/O error - %s", __func__, e.what()); } hashBlock = header.GetHash(); if (txOut.GetHash() != hash) - return error("%s : txid mismatch", __PRETTY_FUNCTION__); + return error("%s : txid mismatch", __func__); return true; } } @@ -1127,7 +1127,7 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos) filein >> block; } catch (std::exception &e) { - return error("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what()); + return error("%s : Deserialize or I/O error - %s", __func__, e.what()); } // Check the header @@ -3317,7 +3317,7 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp) break; } } catch (std::exception &e) { - LogPrintf("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what()); + LogPrintf("%s : Deserialize or I/O error - %s", __func__, e.what()); } } fclose(fileIn); diff --git a/src/main.h b/src/main.h index 17d89ac76..38b39d3c8 100644 --- a/src/main.h +++ b/src/main.h @@ -400,7 +400,7 @@ public: filein >> hashChecksum; } catch (std::exception &e) { - return error("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what()); + return error("%s : Deserialize or I/O error - %s", __func__, e.what()); } // Verify checksum diff --git a/src/txdb.cpp b/src/txdb.cpp index d06639a11..cb92922a3 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -148,7 +148,7 @@ bool CCoinsViewDB::GetStats(CCoinsStats &stats) { } pcursor->Next(); } catch (std::exception &e) { - return error("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what()); + return error("%s : Deserialize or I/O error - %s", __func__, e.what()); } } delete pcursor; @@ -226,7 +226,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts() break; // if shutdown requested or finished loading block index } } catch (std::exception &e) { - return error("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what()); + return error("%s : Deserialize or I/O error - %s", __func__, e.what()); } } delete pcursor;