[glom] Make some methods const.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Make some methods const.
- Date: Thu, 5 Nov 2015 22:21:16 +0000 (UTC)
commit 41dece5cdbb44dfad95cdb7b4d6e98ca79f1b431
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Nov 3 17:44:08 2015 +0100
Make some methods const.
glom/import_csv/csv_parser.cc | 4 ++--
glom/import_csv/csv_parser.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/glom/import_csv/csv_parser.cc b/glom/import_csv/csv_parser.cc
index 71bfb51..77c12e5 100644
--- a/glom/import_csv/csv_parser.cc
+++ b/glom/import_csv/csv_parser.cc
@@ -100,7 +100,7 @@ bool CsvParser::get_rows_empty() const
return m_rows.empty();
}
-const Glib::ustring& CsvParser::get_data(guint row, guint col)
+const Glib::ustring& CsvParser::get_data(guint row, guint col) const
{
static Glib::ustring empty_result;
@@ -552,7 +552,7 @@ void CsvParser::on_buffer_read(const Glib::RefPtr<Gio::AsyncResult>& result)
}
}
-void CsvParser::on_file_query_info(const Glib::RefPtr<Gio::AsyncResult>& result, const
Glib::RefPtr<Gio::File>& source)
+void CsvParser::on_file_query_info(const Glib::RefPtr<Gio::AsyncResult>& result, const
Glib::RefPtr<Gio::File>& source) const
{
try
{
diff --git a/glom/import_csv/csv_parser.h b/glom/import_csv/csv_parser.h
index c1f6cfe..41f5141 100644
--- a/glom/import_csv/csv_parser.h
+++ b/glom/import_csv/csv_parser.h
@@ -76,7 +76,7 @@ public:
bool get_rows_empty() const;
// The nasty reference return is for performance.
- const Glib::ustring& get_data(guint row, guint col);
+ const Glib::ustring& get_data(guint row, guint col) const;
/** Fetches the next row from the parser's cache. It will block until enough
* data was parsed to return a row. An empty row indicates the last row was
@@ -174,7 +174,7 @@ private:
void on_file_read(const Glib::RefPtr<Gio::AsyncResult>& result, const Glib::RefPtr<Gio::File>& source);
void copy_buffer_and_continue_reading(gssize size);
void on_buffer_read(const Glib::RefPtr<Gio::AsyncResult>& result);
- void on_file_query_info(const Glib::RefPtr<Gio::AsyncResult>& result, const Glib::RefPtr<Gio::File>&
source);
+ void on_file_query_info(const Glib::RefPtr<Gio::AsyncResult>& result, const Glib::RefPtr<Gio::File>&
source) const;
void set_state(State state);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]