aboutsummaryrefslogtreecommitdiffstats
path: root/libdevcore/CommonData.cpp
diff options
context:
space:
mode:
authorChristian Parpart <christian@ethereum.org>2018-11-07 19:04:46 +0800
committerChristian Parpart <christian@ethereum.org>2018-11-07 19:17:57 +0800
commitab0de38f16a9eff13ee5a32a3408b890d87941f6 (patch)
tree3ff90d9e6afde63d1217b37ed62ab6e98d1139fc /libdevcore/CommonData.cpp
parent88aee34c22d86a004848ae8bdc818b5168dd94cb (diff)
downloaddexon-solidity-ab0de38f16a9eff13ee5a32a3408b890d87941f6.tar.gz
dexon-solidity-ab0de38f16a9eff13ee5a32a3408b890d87941f6.tar.zst
dexon-solidity-ab0de38f16a9eff13ee5a32a3408b890d87941f6.zip
Eliminate `byte`-typedef and use `uint8_t` in all their places instead.
This change is made to (easily) be forward compatible with future C++ standards, in order to allow compiling the code with newer standards at some point in the future. * Removed the `using byte = uint8_t;` line from Common.h * Mechanically change all uses of `byte` to `uint8_t`. Tested with GCC 7.3 in C++11/14/17 modes :-)
Diffstat (limited to 'libdevcore/CommonData.cpp')
-rw-r--r--libdevcore/CommonData.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdevcore/CommonData.cpp b/libdevcore/CommonData.cpp
index fa1a5353..91c60ffe 100644
--- a/libdevcore/CommonData.cpp
+++ b/libdevcore/CommonData.cpp
@@ -64,7 +64,7 @@ bytes dev::fromHex(std::string const& _s, WhenError _throw)
int h = fromHex(_s[i], WhenError::DontThrow);
int l = fromHex(_s[i + 1], WhenError::DontThrow);
if (h != -1 && l != -1)
- ret.push_back((byte)(h * 16 + l));
+ ret.push_back((uint8_t)(h * 16 + l));
else if (_throw == WhenError::Throw)
BOOST_THROW_EXCEPTION(BadHexCharacter());
else