diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c7e63e..6bb1778 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.1) project(xdgjson - VERSION 0.2.2 + VERSION 0.2.3 LANGUAGES CXX ) @@ -13,7 +13,8 @@ set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall") +set(CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -Wpedantic -Wall -Wextra -g -Og -fno-omit-frame-pointer") include_directories(${LIBXDG_BASEDIR_INCLUDE_DIRS}) include_directories(${JSONCPP_INCLUDE_DIRS}) diff --git a/src/example.cpp b/src/example.cpp index b8e8aeb..dae427d 100644 --- a/src/example.cpp +++ b/src/example.cpp @@ -2,7 +2,7 @@ #include #include "xdgjson.hpp" -int main(int argc, char *argv[]) +int main() { xdgjson config("test.json", "xdgjson"); config.read(); diff --git a/src/xdgjson.cpp b/src/xdgjson.cpp index 853c676..60673d2 100644 --- a/src/xdgjson.cpp +++ b/src/xdgjson.cpp @@ -26,7 +26,7 @@ xdgjson::xdgjson(const string &filename, const string &subdir) _filepath /= filename; } -const bool xdgjson::read() +bool xdgjson::read() { std::ifstream file(_filepath); if (file.is_open()) @@ -44,7 +44,7 @@ const bool xdgjson::read() } } -const bool xdgjson::write() +bool xdgjson::write() { std::ofstream file(_filepath); if (file.is_open()) diff --git a/src/xdgjson.hpp b/src/xdgjson.hpp index b1138ff..cc2bd7b 100644 --- a/src/xdgjson.hpp +++ b/src/xdgjson.hpp @@ -41,14 +41,14 @@ public: * * @return `true` on success */ - const bool read(); + bool read(); /*! * @brief Write the file * * @return `true` on success */ - const bool write(); + bool write(); /*! * @brief Returns a reference to the config as Json::Value