Remove unneccesary interface from Natspec

This commit is contained in:
Alex Beregszaszi
2017-07-18 21:05:34 +01:00
parent 01fbc63623
commit 5bb4bfb08b
3 changed files with 6 additions and 31 deletions
+6 -4
View File
@@ -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);
}