diff --git a/CMakeLists.txt b/CMakeLists.txt index 9de162f..e18f071 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.1) project(xdgcfg - 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} -Wall -pedantic -Wextra -g -Og -fno-omit-frame-pointer") include_directories(${LIBXDG_BASEDIR_INCLUDE_DIRS}) include_directories(${LIBCONFIG_INCLUDE_DIRS}) diff --git a/src/example.cpp b/src/example.cpp index 31f7f2c..090f47b 100644 --- a/src/example.cpp +++ b/src/example.cpp @@ -2,7 +2,7 @@ #include #include "xdgcfg.hpp" -int main(int argc, char *argv[]) +int main() { xdgcfg config("test.cfg", "xdgcfg"); config.set_verbose(true); diff --git a/src/xdgcfg.cpp b/src/xdgcfg.cpp index ea58b17..8307e3d 100644 --- a/src/xdgcfg.cpp +++ b/src/xdgcfg.cpp @@ -29,7 +29,7 @@ xdgcfg::xdgcfg(const string &filename, const string &subdir) _filepath /= filename; } -const uint_fast8_t xdgcfg::read() +uint_fast8_t xdgcfg::read() { try { @@ -57,7 +57,7 @@ const uint_fast8_t xdgcfg::read() return 0; } -const bool xdgcfg::write() +bool xdgcfg::write() { try { @@ -86,12 +86,12 @@ const fs::path xdgcfg::get_filepath() const return _filepath; } -const void xdgcfg::set_verbose(bool verbose) +void xdgcfg::set_verbose(bool verbose) { _verbose = verbose; } -const bool xdgcfg::get_verbose() const +bool xdgcfg::get_verbose() const { return _verbose; } diff --git a/src/xdgcfg.hpp b/src/xdgcfg.hpp index ab62d7f..33760f6 100644 --- a/src/xdgcfg.hpp +++ b/src/xdgcfg.hpp @@ -43,14 +43,14 @@ public: * * @return 0 on success, 1 on I/O error, 2 on parse error. */ - const uint_fast8_t read(); + uint_fast8_t read(); /*! * @brief Write the file * * @return `true` on success */ - const bool write(); + bool write(); /*! * @brief Returns a reference to the config as libconfig::Config @@ -70,12 +70,12 @@ public: /*! * @brief Sets verbosity */ - const void set_verbose(bool verbose); + void set_verbose(bool verbose); /*! * @brief Returns verbosity */ - const bool get_verbose() const; + bool get_verbose() const; private: /*!