Browse Source

Removed superfluous consts.

tags/0.2.3
tastytea 7 months ago
parent
commit
e22f82fc6f
Signed by: tastytea <tastytea@tastytea.de> GPG Key ID: CFC39497F1B26E07
4 changed files with 12 additions and 11 deletions
  1. 3
    2
      CMakeLists.txt
  2. 1
    1
      src/example.cpp
  3. 4
    4
      src/xdgcfg.cpp
  4. 4
    4
      src/xdgcfg.hpp

+ 3
- 2
CMakeLists.txt View File

@@ -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})

+ 1
- 1
src/example.cpp View File

@@ -2,7 +2,7 @@
#include <libconfig.h++>
#include "xdgcfg.hpp"

int main(int argc, char *argv[])
int main()
{
xdgcfg config("test.cfg", "xdgcfg");
config.set_verbose(true);

+ 4
- 4
src/xdgcfg.cpp View File

@@ -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;
}

+ 4
- 4
src/xdgcfg.hpp View File

@@ -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:
/*!

Loading…
Cancel
Save