@@ -81,7 +81,7 @@ void Assembly::importAssemblyItemsFromJSON(Json::Value const& _code, std::vector
8181 solRequire (_code.isArray (), AssemblyImportException, " Supplied JSON is not an array." );
8282 for (auto current = std::begin (_code); current != std::end (_code); ++current)
8383 {
84- auto const & item = m_items.emplace_back (createAssemblyItemFromJSON (*current, _sourceList));
84+ AssemblyItem const & item = m_items.emplace_back (createAssemblyItemFromJSON (*current, _sourceList));
8585 if (item == Instruction::JUMPDEST)
8686 solThrow (AssemblyImportException, " JUMPDEST instruction without a tag" );
8787 else if (item.type () == AssemblyItemType::Tag)
@@ -97,7 +97,7 @@ AssemblyItem Assembly::createAssemblyItemFromJSON(Json::Value const& _json, std:
9797{
9898 solRequire (_json.isObject (), AssemblyImportException, " Supplied JSON is not an object." );
9999 static std::set<std::string> const validMembers{" name" , " begin" , " end" , " source" , " value" , " modifierDepth" , " jumpType" };
100- for (auto const & member: _json.getMemberNames ())
100+ for (std::string const & member: _json.getMemberNames ())
101101 solRequire (
102102 validMembers.count (member),
103103 AssemblyImportException,
@@ -510,25 +510,25 @@ Json::Value Assembly::assemblyJSON(std::map<std::string, unsigned> const& _sourc
510510
511511std::pair<std::shared_ptr<Assembly>, std::vector<std::string>> Assembly::fromJSON (Json::Value const & _json, std::vector<std::string> const & _sourceList, size_t _level)
512512{
513- std::shared_ptr<Assembly> result = std::make_shared<Assembly>(langutil::EVMVersion (), _level == 0 , " " );
513+ auto result = std::make_shared<Assembly>(langutil::EVMVersion (), _level == 0 , " " );
514514 if (_json.isNull ())
515515 return std::make_pair (result, std::vector<std::string>());
516516
517517 solRequire (_json.isObject (), AssemblyImportException, " Supplied JSON is not an object." );
518518 static std::set<std::string> const validMembers{" .code" , " .data" , " .auxdata" , " sourceList" };
519- for (auto const & attribute: _json.getMemberNames ())
519+ for (std::string const & attribute: _json.getMemberNames ())
520520 solRequire (validMembers.count (attribute), AssemblyImportException, " Unknown attribute '" + attribute + " '." );
521521 solRequire (_json.isMember (" .code" ), AssemblyImportException, " Member '.code' does not exist." );
522522 solRequire (_json[" .code" ].isArray (), AssemblyImportException, " Member '.code' is not an array." );
523- for (auto const & codeItem: _json[" .code" ])
523+ for (Json::Value const & codeItem: _json[" .code" ])
524524 solRequire (codeItem.isObject (), AssemblyImportException, " Item of '.code' array is not an object." );
525525
526526 if (_level == 0 )
527527 {
528528 if (_json.isMember (" sourceList" ))
529529 {
530530 solRequire (_json[" sourceList" ].isArray (), AssemblyImportException, " Optional member 'sourceList' is not an array." );
531- for (auto const & sourceListItem: _json[" sourceList" ])
531+ for (Json::Value const & sourceListItem: _json[" sourceList" ])
532532 solRequire (sourceListItem.isString (), AssemblyImportException, " Item of 'sourceList' array is not of type string." );
533533 }
534534 } else
@@ -542,7 +542,7 @@ std::pair<std::shared_ptr<Assembly>, std::vector<std::string>> Assembly::fromJSO
542542 if (_json.isMember (" sourceList" ))
543543 {
544544 solAssert (_level == 0 );
545- for (auto const & it: _json[" sourceList" ])
545+ for (Json::Value const & it: _json[" sourceList" ])
546546 {
547547 solRequire (
548548 std::find (sourceList.begin (), sourceList.end (), it.asString ()) == sourceList.end (),
@@ -605,7 +605,7 @@ std::pair<std::shared_ptr<Assembly>, std::vector<std::string>> Assembly::fromJSO
605605void Assembly::updatePaths (std::vector<Assembly*> const & _parents, std::vector<size_t > const & _absolutePathFromRoot)
606606{
607607 size_t subId = 0 ;
608- for (auto & assembly: this ->m_subs )
608+ for (std::shared_ptr<Assembly> assembly: this ->m_subs )
609609 {
610610 std::vector<Assembly*> parents{_parents};
611611 parents.push_back (this );
@@ -614,7 +614,7 @@ void Assembly::updatePaths(std::vector<Assembly*> const& _parents, std::vector<s
614614 absolutePathFromRoot.emplace_back (subId);
615615
616616 int pindex = 0 ;
617- for (auto & parent: parents)
617+ for (Assembly* parent: parents)
618618 {
619619 if (pindex == 0 )
620620 parent->encodeSubPath (absolutePathFromRoot);
0 commit comments