Removed superfluous consts.
the build was successful Details

This commit is contained in:
tastytea 2019-01-01 09:42:42 +01:00
parent 1a10ef6686
commit ffb0438776
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
4 changed files with 8 additions and 7 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.1) cmake_minimum_required (VERSION 3.1)
project(xdgjson project(xdgjson
VERSION 0.2.2 VERSION 0.2.3
LANGUAGES CXX LANGUAGES CXX
) )
@ -13,7 +13,8 @@ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF) 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(${LIBXDG_BASEDIR_INCLUDE_DIRS})
include_directories(${JSONCPP_INCLUDE_DIRS}) include_directories(${JSONCPP_INCLUDE_DIRS})

View File

@ -2,7 +2,7 @@
#include <jsoncpp/json/json.h> #include <jsoncpp/json/json.h>
#include "xdgjson.hpp" #include "xdgjson.hpp"
int main(int argc, char *argv[]) int main()
{ {
xdgjson config("test.json", "xdgjson"); xdgjson config("test.json", "xdgjson");
config.read(); config.read();

View File

@ -26,7 +26,7 @@ xdgjson::xdgjson(const string &filename, const string &subdir)
_filepath /= filename; _filepath /= filename;
} }
const bool xdgjson::read() bool xdgjson::read()
{ {
std::ifstream file(_filepath); std::ifstream file(_filepath);
if (file.is_open()) if (file.is_open())
@ -44,7 +44,7 @@ const bool xdgjson::read()
} }
} }
const bool xdgjson::write() bool xdgjson::write()
{ {
std::ofstream file(_filepath); std::ofstream file(_filepath);
if (file.is_open()) if (file.is_open())

View File

@ -41,14 +41,14 @@ public:
* *
* @return `true` on success * @return `true` on success
*/ */
const bool read(); bool read();
/*! /*!
* @brief Write the file * @brief Write the file
* *
* @return `true` on success * @return `true` on success
*/ */
const bool write(); bool write();
/*! /*!
* @brief Returns a reference to the config as Json::Value * @brief Returns a reference to the config as Json::Value