[gnote] Remove string_index_of from notedirectorywatcher
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Remove string_index_of from notedirectorywatcher
- Date: Sun, 22 Jan 2017 19:01:43 +0000 (UTC)
commit 864f6d2f0f55def374b75df439298894da535c66
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun Jan 22 20:49:21 2017 +0200
Remove string_index_of from notedirectorywatcher
.../notedirectorywatcherapplicationaddin.cpp | 6 +++---
.../notedirectorywatcherapplicationaddin.hpp | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp
b/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp
index c0d3dd6..9ef6789 100644
--- a/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp
+++ b/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.cpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2012-2014 Aurimas Cernius
+ * Copyright (C) 2012-2014,2017 Aurimas Cernius
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -144,12 +144,12 @@ void NoteDirectoryWatcherApplicationAddin::handle_file_system_change_event(
timeout->attach();
}
-std::string NoteDirectoryWatcherApplicationAddin::get_id(const std::string & path)
+std::string NoteDirectoryWatcherApplicationAddin::get_id(const Glib::ustring & path)
{
std::string dir_separator;
dir_separator += G_DIR_SEPARATOR;
int last_slash = sharp::string_last_index_of(path, std::string(dir_separator));
- int first_period = sharp::string_index_of(path, ".", last_slash);
+ int first_period = path.find(".", last_slash);
return path.substr(last_slash + 1, first_period - last_slash - 1);
}
diff --git a/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.hpp
b/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.hpp
index b3ef84a..090b3fb 100644
--- a/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.hpp
+++ b/src/addins/notedirectorywatcher/notedirectorywatcherapplicationaddin.hpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2012-2014 Aurimas Cernius
+ * Copyright (C) 2012-2014,2017 Aurimas Cernius
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -65,7 +65,7 @@ public:
virtual void shutdown() override;
virtual bool initialized() override;
private:
- static std::string get_id(const std::string & path);
+ static std::string get_id(const Glib::ustring & path);
static std::string make_uri(const std::string & note_id);
NoteDirectoryWatcherApplicationAddin();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]