@@ -533,8 +533,8 @@ std::pair<std::shared_ptr<Assembly>, std::vector<std::string>> Assembly::fromJSO
533
533
if (_json.isMember (" sourceList" ))
534
534
{
535
535
solRequire (_json[" sourceList" ].isArray (), AssemblyImportException, " Optional member 'sourceList' is not an array." );
536
- for (Json::Value const & sourceListItem : _json[" sourceList" ])
537
- solRequire (sourceListItem .isString (), AssemblyImportException, " The 'sourceList' array contains an item that is not a string." );
536
+ for (Json::Value const & sourceName : _json[" sourceList" ])
537
+ solRequire (sourceName .isString (), AssemblyImportException, " The 'sourceList' array contains an item that is not a string." );
538
538
}
539
539
}
540
540
else
@@ -548,14 +548,14 @@ std::pair<std::shared_ptr<Assembly>, std::vector<std::string>> Assembly::fromJSO
548
548
if (_json.isMember (" sourceList" ))
549
549
{
550
550
solAssert (_level == 0 );
551
- for (Json::Value const & it : _json[" sourceList" ])
551
+ for (Json::Value const & sourceName : _json[" sourceList" ])
552
552
{
553
553
solRequire (
554
- std::find (sourceList.begin (), sourceList.end (), it .asString ()) == sourceList.end (),
554
+ std::find (sourceList.begin (), sourceList.end (), sourceName .asString ()) == sourceList.end (),
555
555
AssemblyImportException,
556
556
" Items in 'sourceList' array are not unique."
557
557
);
558
- sourceList.emplace_back (it .asString ());
558
+ sourceList.emplace_back (sourceName .asString ());
559
559
}
560
560
}
561
561
else
@@ -577,22 +577,22 @@ std::pair<std::shared_ptr<Assembly>, std::vector<std::string>> Assembly::fromJSO
577
577
{
578
578
solRequire (dataIter.key ().isString (), AssemblyImportException, " Key inside '.data' is not a string." );
579
579
std::string dataItemID = dataIter.key ().asString ();
580
- Json::Value const & code = data[dataItemID];
581
- if (code .isString ())
580
+ Json::Value const & dataItem = data[dataItemID];
581
+ if (dataItem .isString ())
582
582
{
583
583
solRequire (
584
- code .asString ().empty () || !fromHex (code .asString ()).empty (),
584
+ dataItem .asString ().empty () || !fromHex (dataItem .asString ()).empty (),
585
585
AssemblyImportException,
586
586
" Member '.data' contains a value for '" + dataItemID + " ' that is not a valid hexadecimal string."
587
587
);
588
- result->m_data [h256 (fromHex (dataItemID))] = fromHex (code .asString ());
588
+ result->m_data [h256 (fromHex (dataItemID))] = fromHex (dataItem .asString ());
589
589
}
590
- else if (code .isObject ())
590
+ else if (dataItem .isObject ())
591
591
{
592
592
size_t index = static_cast <size_t >(std::stoi (dataItemID));
593
593
if (result->m_subs .size () <= index)
594
594
result->m_subs .resize (index + 1 );
595
- std::shared_ptr<Assembly> subassembly (Assembly::fromJSON (code , sourceList, _level + 1 ).first );
595
+ std::shared_ptr<Assembly> subassembly (Assembly::fromJSON (dataItem , sourceList, _level + 1 ).first );
596
596
solAssert (subassembly);
597
597
result->m_subs [index] = subassembly;
598
598
}
0 commit comments