JSON-102: fix indent

JSON-102
Claudio Luck 5 years ago
parent 3fcd96455c
commit f2028747aa

@ -87,24 +87,24 @@ ServerVersion::ServerVersion(unsigned maj, unsigned min, unsigned p)
, package_version{PackageVersion}
{
if (!PackageVersion)
try{
const std::string file_content =
boost::algorithm::trim_copy(
pEp::utility::slurp("PackageVersion")
);
try{
const std::string file_content =
boost::algorithm::trim_copy(
pEp::utility::slurp("PackageVersion")
);
js::Value v;
js::read_or_throw(file_content, v);
const js::Object obj = v.get_obj();
PackageVersion = pEp::utility::from_json_object<char*, js::str_type>(obj, "package_version");
PackageVersion = strdup(file_content.c_str());
this->package_version = PackageVersion;
}
catch(std::runtime_error&)
{
// slurp() throws when it cannot read the file.
}
PackageVersion = strdup(file_content.c_str());
this->package_version = PackageVersion;
}
catch(std::runtime_error&)
{
// slurp() throws when it cannot read the file.
}
}
const ServerVersion& server_version()

Loading…
Cancel
Save