@@ -81,7 +81,7 @@ void Assembly::importAssemblyItemsFromJSON(Json::Value const& _code, std::vector
81
81
solRequire (_code.isArray (), AssemblyImportException, " Supplied JSON is not an array." );
82
82
for (auto current = std::begin (_code); current != std::end (_code); ++current)
83
83
{
84
- auto const & item = m_items.emplace_back (createAssemblyItemFromJSON (*current, _sourceList));
84
+ AssemblyItem const & item = m_items.emplace_back (createAssemblyItemFromJSON (*current, _sourceList));
85
85
if (item == Instruction::JUMPDEST)
86
86
solThrow (AssemblyImportException, " JUMPDEST instruction without a tag" );
87
87
else if (item.type () == AssemblyItemType::Tag)
@@ -97,7 +97,7 @@ AssemblyItem Assembly::createAssemblyItemFromJSON(Json::Value const& _json, std:
97
97
{
98
98
solRequire (_json.isObject (), AssemblyImportException, " Supplied JSON is not an object." );
99
99
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 ())
101
101
solRequire (
102
102
validMembers.count (member),
103
103
AssemblyImportException,
@@ -512,19 +512,19 @@ std::pair<std::shared_ptr<Assembly>, std::vector<std::string>> Assembly::fromJSO
512
512
{
513
513
solRequire (_json.isObject (), AssemblyImportException, " Supplied JSON is not an object." );
514
514
static std::set<std::string> const validMembers{" .code" , " .data" , " .auxdata" , " sourceList" };
515
- for (auto const & attribute: _json.getMemberNames ())
515
+ for (std::string const & attribute: _json.getMemberNames ())
516
516
solRequire (validMembers.count (attribute), AssemblyImportException, " Unknown attribute '" + attribute + " '." );
517
517
solRequire (_json.isMember (" .code" ), AssemblyImportException, " Member '.code' does not exist." );
518
518
solRequire (_json[" .code" ].isArray (), AssemblyImportException, " Member '.code' is not an array." );
519
- for (auto const & codeItem: _json[" .code" ])
519
+ for (Json::Value const & codeItem: _json[" .code" ])
520
520
solRequire (codeItem.isObject (), AssemblyImportException, " Item of '.code' array is not an object." );
521
521
522
522
if (_level == 0 )
523
523
{
524
524
if (_json.isMember (" sourceList" ))
525
525
{
526
526
solRequire (_json[" sourceList" ].isArray (), AssemblyImportException, " Optional member 'sourceList' is not an array." );
527
- for (auto const & sourceListItem: _json[" sourceList" ])
527
+ for (Json::Value const & sourceListItem: _json[" sourceList" ])
528
528
solRequire (sourceListItem.isString (), AssemblyImportException, " Item of 'sourceList' array is not of type string." );
529
529
}
530
530
} else
@@ -539,7 +539,7 @@ std::pair<std::shared_ptr<Assembly>, std::vector<std::string>> Assembly::fromJSO
539
539
if (_json.isMember (" sourceList" ))
540
540
{
541
541
solAssert (_level == 0 );
542
- for (auto const & it: _json[" sourceList" ])
542
+ for (Json::Value const & it: _json[" sourceList" ])
543
543
{
544
544
solRequire (
545
545
std::find (sourceList.begin (), sourceList.end (), it.asString ()) == sourceList.end (),
@@ -602,7 +602,7 @@ std::pair<std::shared_ptr<Assembly>, std::vector<std::string>> Assembly::fromJSO
602
602
void Assembly::updatePaths (std::vector<Assembly*> const & _parents, std::vector<size_t > const & _absolutePathFromRoot)
603
603
{
604
604
size_t subId = 0 ;
605
- for (auto & assembly: this ->m_subs )
605
+ for (std::shared_ptr<Assembly> assembly: this ->m_subs )
606
606
{
607
607
std::vector<Assembly*> parents{_parents};
608
608
parents.push_back (this );
@@ -611,7 +611,7 @@ void Assembly::updatePaths(std::vector<Assembly*> const& _parents, std::vector<s
611
611
absolutePathFromRoot.emplace_back (subId);
612
612
613
613
int pindex = 0 ;
614
- for (auto & parent: parents)
614
+ for (Assembly* parent: parents)
615
615
{
616
616
if (pindex == 0 )
617
617
parent->encodeSubPath (absolutePathFromRoot);
0 commit comments