mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
make use of C++ = default constructor declarations as well as more non-static member initialization syntax.
This commit is contained in:
+6
-6
@@ -42,10 +42,9 @@ public:
|
||||
size_t id;
|
||||
std::uint64_t hash;
|
||||
};
|
||||
YulStringRepository():
|
||||
m_strings{std::make_shared<std::string>()},
|
||||
m_hashToID{std::make_pair(emptyHash(), 0)}
|
||||
{}
|
||||
|
||||
YulStringRepository() = default;
|
||||
|
||||
static YulStringRepository& instance()
|
||||
{
|
||||
static YulStringRepository inst;
|
||||
@@ -80,9 +79,10 @@ public:
|
||||
return hash;
|
||||
}
|
||||
static constexpr std::uint64_t emptyHash() { return 14695981039346656037u; }
|
||||
|
||||
private:
|
||||
std::vector<std::shared_ptr<std::string>> m_strings;
|
||||
std::unordered_multimap<std::uint64_t, size_t> m_hashToID;
|
||||
std::vector<std::shared_ptr<std::string>> m_strings = {std::make_shared<std::string>()};
|
||||
std::unordered_multimap<std::uint64_t, size_t> m_hashToID = {{emptyHash(), 0}};
|
||||
};
|
||||
|
||||
/// Wrapper around handles into the YulString repository.
|
||||
|
||||
Reference in New Issue
Block a user