aboutsummaryrefslogtreecommitdiffstats
path: root/libdevcore
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-08-29 08:01:47 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-08-29 18:09:18 +0800
commit7fb4a64136af18f2b61aef71ecc33ccbbc790ec6 (patch)
treec44271af2ca3c9a4461a297ba608f1a75910f09b /libdevcore
parentb364bd048ffaf233782a23dabd13622431a75aa3 (diff)
downloaddexon-solidity-7fb4a64136af18f2b61aef71ecc33ccbbc790ec6.tar
dexon-solidity-7fb4a64136af18f2b61aef71ecc33ccbbc790ec6.tar.gz
dexon-solidity-7fb4a64136af18f2b61aef71ecc33ccbbc790ec6.tar.bz2
dexon-solidity-7fb4a64136af18f2b61aef71ecc33ccbbc790ec6.tar.lz
dexon-solidity-7fb4a64136af18f2b61aef71ecc33ccbbc790ec6.tar.xz
dexon-solidity-7fb4a64136af18f2b61aef71ecc33ccbbc790ec6.tar.zst
dexon-solidity-7fb4a64136af18f2b61aef71ecc33ccbbc790ec6.zip
Move all file specific globals to anonymous namespace
Diffstat (limited to 'libdevcore')
-rw-r--r--libdevcore/CommonIO.cpp5
-rw-r--r--libdevcore/SwarmHash.cpp4
2 files changed, 9 insertions, 0 deletions
diff --git a/libdevcore/CommonIO.cpp b/libdevcore/CommonIO.cpp
index 52829455..5d47937b 100644
--- a/libdevcore/CommonIO.cpp
+++ b/libdevcore/CommonIO.cpp
@@ -35,6 +35,9 @@
using namespace std;
using namespace dev;
+namespace
+{
+
template <typename _T>
inline _T contentsGeneric(std::string const& _file)
{
@@ -56,6 +59,8 @@ inline _T contentsGeneric(std::string const& _file)
return ret;
}
+}
+
string dev::contentsString(string const& _file)
{
return contentsGeneric<string>(_file);
diff --git a/libdevcore/SwarmHash.cpp b/libdevcore/SwarmHash.cpp
index 78188668..1c718200 100644
--- a/libdevcore/SwarmHash.cpp
+++ b/libdevcore/SwarmHash.cpp
@@ -24,6 +24,8 @@
using namespace std;
using namespace dev;
+namespace
+{
bytes toLittleEndian(size_t _size)
{
@@ -59,6 +61,8 @@ h256 swarmHashIntermediate(string const& _input, size_t _offset, size_t _length)
return swarmHashSimple(ref, _length);
}
+}
+
h256 dev::swarmHash(string const& _input)
{
return swarmHashIntermediate(_input, 0, _input.size());