mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add std:: qualifier to move() calls
This commit is contained in:
@@ -134,7 +134,7 @@ Json::Value ABI::generate(ContractDefinition const& _contractDef)
|
||||
formatType(p->name(), *type, *p->annotation().type, false)
|
||||
);
|
||||
}
|
||||
abi.emplace(move(errorJson));
|
||||
abi.emplace(std::move(errorJson));
|
||||
}
|
||||
|
||||
Json::Value abiJson{Json::arrayValue};
|
||||
|
||||
@@ -208,7 +208,7 @@ void CompilerStack::setRemappings(vector<ImportRemapper::Remapping> _remappings)
|
||||
solThrow(CompilerError, "Must set remappings before parsing.");
|
||||
for (auto const& remapping: _remappings)
|
||||
solAssert(!remapping.prefix.empty(), "");
|
||||
m_importRemapper.setRemappings(move(_remappings));
|
||||
m_importRemapper.setRemappings(std::move(_remappings));
|
||||
}
|
||||
|
||||
void CompilerStack::setViaIR(bool _viaIR)
|
||||
@@ -407,7 +407,7 @@ void CompilerStack::importASTs(map<string, Json::Value> const& _sources)
|
||||
src.first,
|
||||
true // imported from AST
|
||||
);
|
||||
m_sources[path] = move(source);
|
||||
m_sources[path] = std::move(source);
|
||||
}
|
||||
m_stackState = ParsedAndImported;
|
||||
m_importedSources = true;
|
||||
@@ -793,7 +793,7 @@ Json::Value CompilerStack::generatedSources(string const& _contractName, bool _r
|
||||
sources[0]["name"] = sourceName;
|
||||
sources[0]["id"] = sourceIndex;
|
||||
sources[0]["language"] = "Yul";
|
||||
sources[0]["contents"] = move(source);
|
||||
sources[0]["contents"] = std::move(source);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ void ImportRemapper::setRemappings(vector<Remapping> _remappings)
|
||||
{
|
||||
for (auto const& remapping: _remappings)
|
||||
solAssert(!remapping.prefix.empty(), "");
|
||||
m_remappings = move(_remappings);
|
||||
m_remappings = std::move(_remappings);
|
||||
}
|
||||
|
||||
SourceUnitName ImportRemapper::apply(ImportPath const& _path, string const& _context) const
|
||||
|
||||
@@ -92,7 +92,7 @@ Json::Value Natspec::userDocumentation(ContractDefinition const& _contractDef)
|
||||
{
|
||||
Json::Value errorDoc{Json::objectValue};
|
||||
errorDoc["notice"] = value;
|
||||
doc["errors"][error->functionType(true)->externalSignature()].append(move(errorDoc));
|
||||
doc["errors"][error->functionType(true)->externalSignature()].append(std::move(errorDoc));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,10 +140,10 @@ Json::Value Natspec::devDocumentation(ContractDefinition const& _contractDef)
|
||||
);
|
||||
|
||||
if (!jsonReturn.empty())
|
||||
method["returns"] = move(jsonReturn);
|
||||
method["returns"] = std::move(jsonReturn);
|
||||
|
||||
if (!method.empty())
|
||||
doc["methods"][it.second->externalSignature()] = move(method);
|
||||
doc["methods"][it.second->externalSignature()] = std::move(method);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ Json::Value Natspec::extractCustomDoc(multimap<string, DocTag> const& _tags)
|
||||
return Json::nullValue;
|
||||
Json::Value result{Json::objectValue};
|
||||
for (auto& [tag, value]: concatenated)
|
||||
result[tag] = move(value);
|
||||
result[tag] = std::move(value);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -403,7 +403,7 @@ Json::Value collectEVMObject(
|
||||
if (_runtimeObject && _artifactRequested("immutableReferences"))
|
||||
output["immutableReferences"] = formatImmutableReferences(_object.immutableReferences);
|
||||
if (_artifactRequested("generatedSources"))
|
||||
output["generatedSources"] = move(_generatedSources);
|
||||
output["generatedSources"] = std::move(_generatedSources);
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -966,7 +966,7 @@ std::variant<StandardCompiler::InputsAndSettings, Json::Value> StandardCompiler:
|
||||
if (sourceContracts[source].empty())
|
||||
return formatFatalError("JSONError", "Source contracts must be a non-empty array.");
|
||||
}
|
||||
ret.modelCheckerSettings.contracts = {move(sourceContracts)};
|
||||
ret.modelCheckerSettings.contracts = {std::move(sourceContracts)};
|
||||
}
|
||||
|
||||
if (modelCheckerSettings.isMember("divModNoSlacks"))
|
||||
@@ -1076,7 +1076,7 @@ Json::Value StandardCompiler::compileSolidity(StandardCompiler::InputsAndSetting
|
||||
compilerStack.setViaIR(_inputsAndSettings.viaIR);
|
||||
compilerStack.setEVMVersion(_inputsAndSettings.evmVersion);
|
||||
compilerStack.setParserErrorRecovery(_inputsAndSettings.parserErrorRecovery);
|
||||
compilerStack.setRemappings(move(_inputsAndSettings.remappings));
|
||||
compilerStack.setRemappings(std::move(_inputsAndSettings.remappings));
|
||||
compilerStack.setOptimiserSettings(std::move(_inputsAndSettings.optimiserSettings));
|
||||
compilerStack.setRevertStringBehaviour(_inputsAndSettings.revertStrings);
|
||||
if (_inputsAndSettings.debugInfoSelection.has_value())
|
||||
@@ -1582,7 +1582,7 @@ Json::Value StandardCompiler::formatFunctionDebugData(
|
||||
fun["entryPoint"] = Json::nullValue;
|
||||
fun["parameterSlots"] = Json::UInt64(info.params);
|
||||
fun["returnSlots"] = Json::UInt64(info.returns);
|
||||
ret[name] = move(fun);
|
||||
ret[name] = std::move(fun);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -40,8 +40,8 @@ Json::Value StorageLayout::generate(ContractDefinition const& _contractDef)
|
||||
variables.append(generate(*var, slot, offset));
|
||||
|
||||
Json::Value layout;
|
||||
layout["storage"] = move(variables);
|
||||
layout["types"] = move(m_types);
|
||||
layout["storage"] = std::move(variables);
|
||||
layout["types"] = std::move(m_types);
|
||||
return layout;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ void StorageLayout::generate(Type const* _type)
|
||||
auto const& offsets = structType->storageOffsetsOfMember(member->name());
|
||||
members.append(generate(*member, offsets.first, offsets.second));
|
||||
}
|
||||
typeInfo["members"] = move(members);
|
||||
typeInfo["members"] = std::move(members);
|
||||
typeInfo["encoding"] = "inplace";
|
||||
}
|
||||
else if (auto mappingType = dynamic_cast<MappingType const*>(_type))
|
||||
|
||||
Reference in New Issue
Block a user