From f38429fef88b644e9c54c1bf2a1abe754dbd324d Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 22 Aug 2017 13:55:01 +0100 Subject: Switch stream properties back after temporary modification --- libdevcore/FixedHash.h | 2 ++ libevmasm/AssemblyItem.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/libdevcore/FixedHash.h b/libdevcore/FixedHash.h index 1c37b675..141e9ffd 100644 --- a/libdevcore/FixedHash.h +++ b/libdevcore/FixedHash.h @@ -27,6 +27,7 @@ #include #include #include +#include #include "CommonData.h" namespace dev @@ -224,6 +225,7 @@ template<> inline size_t FixedHash<32>::hash::operator()(FixedHash<32> const& va template inline std::ostream& operator<<(std::ostream& _out, FixedHash const& _h) { + boost::io::ios_all_saver guard(_out); _out << std::noshowbase << std::hex << std::setfill('0'); for (unsigned i = 0; i < N; ++i) _out << std::setw(2) << (int)_h[i]; diff --git a/libevmasm/AssemblyItem.cpp b/libevmasm/AssemblyItem.cpp index 76104866..419a8c0b 100644 --- a/libevmasm/AssemblyItem.cpp +++ b/libevmasm/AssemblyItem.cpp @@ -219,10 +219,10 @@ ostream& dev::eth::operator<<(ostream& _out, AssemblyItem const& _item) _out << "\t" << _item.getJumpTypeAsString(); break; case Push: - _out << " PUSH " << hex << _item.data(); + _out << " PUSH " << hex << _item.data() << dec; break; case PushString: - _out << " PushString" << hex << (unsigned)_item.data(); + _out << " PushString" << hex << (unsigned)_item.data() << dec; break; case PushTag: { @@ -237,19 +237,19 @@ ostream& dev::eth::operator<<(ostream& _out, AssemblyItem const& _item) _out << " Tag " << _item.data(); break; case PushData: - _out << " PushData " << hex << (unsigned)_item.data(); + _out << " PushData " << hex << (unsigned)_item.data() << dec; break; case PushSub: - _out << " PushSub " << hex << size_t(_item.data()); + _out << " PushSub " << hex << size_t(_item.data()) << dec; break; case PushSubSize: - _out << " PushSubSize " << hex << size_t(_item.data()); + _out << " PushSubSize " << hex << size_t(_item.data()) << dec; break; case PushProgramSize: _out << " PushProgramSize"; break; case PushLibraryAddress: - _out << " PushLibraryAddress " << hex << h256(_item.data()).abridgedMiddle(); + _out << " PushLibraryAddress " << hex << h256(_item.data()).abridgedMiddle() << dec; break; case UndefinedItem: _out << " ???"; -- cgit