From 8a79cfbe1dbec158558fcc9b5cfbe8e5396b738a Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Thu, 8 Nov 2018 22:38:29 +0100 Subject: [PATCH] Mark query functions as const --- src/core/desktopfilereader.cpp | 4 ++-- src/core/desktopfilereader.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/desktopfilereader.cpp b/src/core/desktopfilereader.cpp index 7361418..94ded49 100644 --- a/src/core/desktopfilereader.cpp +++ b/src/core/desktopfilereader.cpp @@ -58,7 +58,7 @@ DesktopFileReader& DesktopFileReader::operator=(DesktopFileReader&& other) noexc return *this; } -bool DesktopFileReader::isEmpty() { +bool DesktopFileReader::isEmpty() const { return d->isEmpty(); } @@ -70,6 +70,6 @@ bool DesktopFileReader::operator!=(const DesktopFileReader& other) const { return !operator==(other); } -boost::filesystem::path DesktopFileReader::path() { +boost::filesystem::path DesktopFileReader::path() const { return d->path; } diff --git a/src/core/desktopfilereader.h b/src/core/desktopfilereader.h index ebb1416..058eeca 100644 --- a/src/core/desktopfilereader.h +++ b/src/core/desktopfilereader.h @@ -36,8 +36,8 @@ public: public: // checks whether a file has been read already - bool isEmpty(); + bool isEmpty() const; // returns desktop file path - boost::filesystem::path path(); + boost::filesystem::path path() const; };