Skip to content

Commit 0153d92

Browse files
committed
Minors.
1 parent 028c26d commit 0153d92

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

libevmasm/Assembly.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void Assembly::addAssemblyItemsFromJSON(Json::Value const& _code)
7979
solAssert(m_items.empty(), "");
8080
solAssert(_code.isArray(), "");
8181
for (auto const& jsonItem: _code)
82-
m_items.emplace_back(loadItemFromJSON(jsonItem));
82+
m_items.emplace_back(createAssemblyItemFromJSON(jsonItem));
8383

8484
for (auto current = m_items.begin(); current != m_items.end(); ++current)
8585
{
@@ -96,7 +96,7 @@ void Assembly::addAssemblyItemsFromJSON(Json::Value const& _code)
9696
}
9797
}
9898

99-
AssemblyItem Assembly::loadItemFromJSON(Json::Value const& _json)
99+
AssemblyItem Assembly::createAssemblyItemFromJSON(Json::Value const& _json)
100100
{
101101
std::string name = _json["name"].isString() ? _json["name"].asString() : "";
102102
int begin = _json["begin"].isInt() ? _json["begin"].asInt() : -1;

libevmasm/Assembly.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,20 +168,20 @@ class Assembly
168168

169169
bool isCreation() const { return m_creation; }
170170

171-
/// Set the source list.
171+
/// Set the source name list.
172172
void setSources(std::vector<std::shared_ptr<std::string const>> _sources)
173173
{
174174
m_sources = std::move(_sources);
175175
}
176176

177-
/// Set the source list from simple vector<string>.
177+
/// Set the source name list from simple vector<string>.
178178
void setSources(std::vector<std::string> const& _sources)
179179
{
180180
for (auto const& item: _sources)
181181
m_sources.emplace_back(std::make_shared<std::string>(item));
182182
}
183183

184-
/// @returns List of sources.
184+
/// @returns List of source names.
185185
std::vector<std::shared_ptr<std::string const>> sources() const& { return m_sources; }
186186

187187
protected:
@@ -197,8 +197,8 @@ class Assembly
197197

198198
/// Creates an AssemblyItem from a given JSON representation.
199199
/// @param _json JSON representation of an assembly item
200-
/// @returns AssemblyItem from a given JSON representation.
201-
AssemblyItem loadItemFromJSON(Json::Value const& _json);
200+
/// @returns AssemblyItem of _json argument.
201+
AssemblyItem createAssemblyItemFromJSON(Json::Value const& _json);
202202

203203
private:
204204
bool m_invalid = false;

libsolidity/interface/CompilerStack.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ void CompilerStack::importEvmAssemblyJson(std::map<std::string, Json::Value> con
423423
if (m_stackState != Empty)
424424
solThrow(CompilerError, "Must call importEvmAssemblyJson only before the SourcesSet state.");
425425

426-
Json::Value const& jsonValue = _sources.begin()->second;
426+
Json::Value jsonValue = _sources.begin()->second;
427427
if (jsonValue.isMember("sourceList"))
428428
for (auto const& item: jsonValue["sourceList"])
429429
{
@@ -432,7 +432,7 @@ void CompilerStack::importEvmAssemblyJson(std::map<std::string, Json::Value> con
432432
m_sources.emplace(std::make_pair(item.asString(), source));
433433
m_sourceOrder.push_back(&m_sources[item.asString()]);
434434
}
435-
m_evmAssemblyJson[_sources.begin()->first] = jsonValue;
435+
m_evmAssemblyJson[_sources.begin()->first] = std::move(jsonValue);
436436
m_importedSources = true;
437437
m_stackState = SourcesSet;
438438
}

0 commit comments

Comments
 (0)