From 294665a85a9e6b299befd8ff6053f314578db2cf Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 8 Dec 2019 19:37:12 +0100 Subject: Cleanup: Remove redundant string initialisations --- src/Parser.cpp | 2 +- src/Serialiser.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Parser.cpp b/src/Parser.cpp index 631d5cf4..5cc1dedd 100644 --- a/src/Parser.cpp +++ b/src/Parser.cpp @@ -71,8 +71,8 @@ Parser::find_resources(Sord::World& world, for (Sord::Iter i = model.find(nil, rdf_type, type); !i.end(); ++i) { const Sord::Node resource = i.get_subject(); const std::string resource_uri = resource.to_c_string(); - std::string file_path = ""; Sord::Iter f = model.find(resource, rdfs_seeAlso, nil); + std::string file_path; if (!f.end()) { uint8_t* p = serd_file_uri_parse(f.get_object().to_u_string(), nullptr); file_path = (const char*)p; diff --git a/src/Serialiser.cpp b/src/Serialiser.cpp index a1a49533..7ab04f91 100644 --- a/src/Serialiser.cpp +++ b/src/Serialiser.cpp @@ -258,7 +258,7 @@ Serialiser::finish() std::string Serialiser::Impl::finish() { - std::string ret = ""; + std::string ret; if (_mode == Mode::TO_FILE) { SerdStatus st = _model->write_to_file(_base_uri, SERD_TURTLE); if (st) { -- cgit v1.2.1