@@ -510,25 +510,25 @@ Json::Value Assembly::assemblyJSON(std::map<std::string, unsigned> const& _sourc
510
510
511
511
std::pair<std::shared_ptr<Assembly>, std::vector<std::string>> Assembly::fromJSON (Json::Value const & _json, std::vector<std::string> const & _sourceList, size_t _level)
512
512
{
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 , " " );
514
514
if (_json.isNull ())
515
515
return std::make_pair (result, std::vector<std::string>());
516
516
517
517
solRequire (_json.isObject (), AssemblyImportException, " Supplied JSON is not an object." );
518
518
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 ())
520
520
solRequire (validMembers.count (attribute), AssemblyImportException, " Unknown attribute '" + attribute + " '." );
521
521
solRequire (_json.isMember (" .code" ), AssemblyImportException, " Member '.code' does not exist." );
522
522
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" ])
524
524
solRequire (codeItem.isObject (), AssemblyImportException, " Item of '.code' array is not an object." );
525
525
526
526
if (_level == 0 )
527
527
{
528
528
if (_json.isMember (" sourceList" ))
529
529
{
530
530
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" ])
532
532
solRequire (sourceListItem.isString (), AssemblyImportException, " Item of 'sourceList' array is not of type string." );
533
533
}
534
534
} else
@@ -542,7 +542,7 @@ std::pair<std::shared_ptr<Assembly>, std::vector<std::string>> Assembly::fromJSO
542
542
if (_json.isMember (" sourceList" ))
543
543
{
544
544
solAssert (_level == 0 );
545
- for (auto const & it: _json[" sourceList" ])
545
+ for (Json::Value const & it: _json[" sourceList" ])
546
546
{
547
547
solRequire (
548
548
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
605
605
void Assembly::updatePaths (std::vector<Assembly*> const & _parents, std::vector<size_t > const & _absolutePathFromRoot)
606
606
{
607
607
size_t subId = 0 ;
608
- for (auto & assembly: this ->m_subs )
608
+ for (std::shared_ptr<Assembly> assembly: this ->m_subs )
609
609
{
610
610
std::vector<Assembly*> parents{_parents};
611
611
parents.push_back (this );
@@ -614,7 +614,7 @@ void Assembly::updatePaths(std::vector<Assembly*> const& _parents, std::vector<s
614
614
absolutePathFromRoot.emplace_back (subId);
615
615
616
616
int pindex = 0 ;
617
- for (auto & parent: parents)
617
+ for (Assembly* parent: parents)
618
618
{
619
619
if (pindex == 0 )
620
620
parent->encodeSubPath (absolutePathFromRoot);
0 commit comments