diff options
author | David Robillard <d@drobilla.net> | 2012-03-10 03:27:04 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-03-10 03:27:04 +0000 |
commit | 4b0f77528d38c630b68cb193e4832289efc46531 (patch) | |
tree | 304e1c511f94f93dd5e70969c21fbdf0b73fe6b6 /src/serialisation | |
parent | a60da2bc0f7fbaa8a6722d8ac40c2b79841777a1 (diff) | |
download | ingen-4b0f77528d38c630b68cb193e4832289efc46531.tar.gz ingen-4b0f77528d38c630b68cb193e4832289efc46531.tar.bz2 ingen-4b0f77528d38c630b68cb193e4832289efc46531.zip |
Delete trailing whitespace.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4041 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/serialisation')
-rw-r--r-- | src/serialisation/Parser.cpp | 32 | ||||
-rw-r--r-- | src/serialisation/Serialiser.cpp | 1 |
2 files changed, 16 insertions, 17 deletions
diff --git a/src/serialisation/Parser.cpp b/src/serialisation/Parser.cpp index 2ef387e8..dfd5bdf6 100644 --- a/src/serialisation/Parser.cpp +++ b/src/serialisation/Parser.cpp @@ -61,21 +61,21 @@ relative_uri(Glib::ustring base, const Glib::ustring uri, bool leading_slash) { Glib::ustring ret; if (uri != base) { - SerdURI base_uri; - serd_uri_parse((const uint8_t*)base.c_str(), &base_uri); - - SerdURI normal_base_uri; - SerdNode normal_base_uri_node = serd_node_new_uri_from_string( - (const uint8_t*)".", &base_uri, &normal_base_uri); - - Glib::ustring normal_base_str((const char*)normal_base_uri_node.buf); - - ret = uri; - if (uri.length() >= normal_base_str.length() - && uri.substr(0, normal_base_str.length()) == normal_base_str) { + SerdURI base_uri; + serd_uri_parse((const uint8_t*)base.c_str(), &base_uri); + + SerdURI normal_base_uri; + SerdNode normal_base_uri_node = serd_node_new_uri_from_string( + (const uint8_t*)".", &base_uri, &normal_base_uri); + + Glib::ustring normal_base_str((const char*)normal_base_uri_node.buf); + + ret = uri; + if (uri.length() >= normal_base_str.length() + && uri.substr(0, normal_base_str.length()) == normal_base_str) { ret = uri.substr(normal_base_str.length()); - if (leading_slash && ret[0] != '/') - ret = Glib::ustring("/") + ret; + if (leading_slash && ret[0] != '/') + ret = Glib::ustring("/") + ret; } } @@ -588,9 +588,9 @@ Parser::parse_file(Ingen::Shared::World* world, std::string uri; try { uri = Glib::filename_to_uri(path, ""); - } catch (const Glib::ConvertError& e) { + } catch (const Glib::ConvertError& e) { LOG(error) << "Path to URI conversion error: " << e.what() << endl; - return false; + return false; } const uint8_t* uri_c_str = (const uint8_t*)uri.c_str(); diff --git a/src/serialisation/Serialiser.cpp b/src/serialisation/Serialiser.cpp index 8ff1887f..6e6db3ed 100644 --- a/src/serialisation/Serialiser.cpp +++ b/src/serialisation/Serialiser.cpp @@ -200,7 +200,6 @@ void Serialiser::Impl::write_bundle(SharedPtr<const Patch> patch, const std::string& a_path) { - std::string path = Glib::filename_from_uri(a_path); if (Glib::file_test(path, Glib::FILE_TEST_EXISTS) && !Glib::file_test(path, Glib::FILE_TEST_IS_DIR)) { |