mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove unneccesary interface from Natspec
This commit is contained in:
@@ -451,18 +451,20 @@ Json::Value const& CompilerStack::natspec(Contract const& _contract, Documentati
|
||||
{
|
||||
case DocumentationType::NatspecUser:
|
||||
doc = &_contract.userDocumentation;
|
||||
// caches the result
|
||||
if (!*doc)
|
||||
doc->reset(new Json::Value(Natspec::userDocumentation(*_contract.contract)));
|
||||
break;
|
||||
case DocumentationType::NatspecDev:
|
||||
doc = &_contract.devDocumentation;
|
||||
// caches the result
|
||||
if (!*doc)
|
||||
doc->reset(new Json::Value(Natspec::devDocumentation(*_contract.contract)));
|
||||
break;
|
||||
default:
|
||||
BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Illegal documentation type."));
|
||||
}
|
||||
|
||||
// caches the result
|
||||
if (!*doc)
|
||||
doc->reset(new Json::Value(Natspec::documentation(*_contract.contract, _type)));
|
||||
|
||||
return *(*doc);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user