[niepce] importer: slight cleanups
- From: Hubert Figuière <hub src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [niepce] importer: slight cleanups
- Date: Mon, 22 May 2017 03:08:05 +0000 (UTC)
commit 87f1c5564121bba1511827531859169090a91821
Author: Hubert Figuière <hub figuiere net>
Date: Tue May 16 22:01:21 2017 -0400
importer: slight cleanups
src/engine/importer/directoryimporter.cpp | 2 +-
src/engine/importer/importedfile.hpp | 8 +++++++-
src/fwk/toolkit/uiresult.hpp | 8 ++++----
3 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/src/engine/importer/directoryimporter.cpp b/src/engine/importer/directoryimporter.cpp
index 95e85fd..d39e539 100644
--- a/src/engine/importer/directoryimporter.cpp
+++ b/src/engine/importer/directoryimporter.cpp
@@ -36,7 +36,7 @@ public:
{
m_name = fwk::path_basename(path);
}
- const std::string & name() override
+ const std::string & name() const override
{
return m_name;
}
diff --git a/src/engine/importer/importedfile.hpp b/src/engine/importer/importedfile.hpp
index cdef14f..c9e09cc 100644
--- a/src/engine/importer/importedfile.hpp
+++ b/src/engine/importer/importedfile.hpp
@@ -29,10 +29,16 @@ class ImportedFile {
public:
typedef std::shared_ptr<ImportedFile> Ptr;
+ ImportedFile()
+ {}
+
+ ImportedFile(const ImportedFile&) = delete;
+ ImportedFile& operator=(const ImportedFile&) = delete;
+
virtual ~ImportedFile()
{}
- virtual const std::string & name() = 0;
+ virtual const std::string & name() const = 0;
private:
};
diff --git a/src/fwk/toolkit/uiresult.hpp b/src/fwk/toolkit/uiresult.hpp
index 4a49297..806eca6 100644
--- a/src/fwk/toolkit/uiresult.hpp
+++ b/src/fwk/toolkit/uiresult.hpp
@@ -60,13 +60,13 @@ public:
m_data = std::move(d);
}
m_notifier.emit();
- };
+ }
T recv_data() {
{
std::lock_guard<std::mutex> lock(m_data_mutex);
return m_data;
}
- };
+ }
private:
T m_data;
};
@@ -87,7 +87,7 @@ public:
m_data.push_back(std::move(d));
}
m_notifier.emit();
- };
+ }
Option<T> recv_data() {
std::lock_guard<std::mutex> lock(m_data_mutex);
if (m_data.empty()) {
@@ -96,7 +96,7 @@ public:
auto result = Option<T>(m_data.front());
m_data.pop_front();
return result;
- };
+ }
private:
std::deque<T> m_data;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]