Browse Source

Removed superfluous consts.

tags/0.2.3
tastytea 5 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 @@
1 1
 cmake_minimum_required (VERSION 3.1)
2 2
 project(xdgcfg
3
-        VERSION 0.2.2
3
+        VERSION 0.2.3
4 4
         LANGUAGES CXX
5 5
 )
6 6
 
@@ -13,7 +13,8 @@ set(CMAKE_CXX_STANDARD 14)
13 13
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
14 14
 set(CMAKE_CXX_EXTENSIONS OFF)
15 15
 
16
-set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall")
16
+set(CMAKE_CXX_FLAGS
17
+    "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -g -Og -fno-omit-frame-pointer")
17 18
 
18 19
 include_directories(${LIBXDG_BASEDIR_INCLUDE_DIRS})
19 20
 include_directories(${LIBCONFIG_INCLUDE_DIRS})

+ 1
- 1
src/example.cpp View File

@@ -2,7 +2,7 @@
2 2
 #include <libconfig.h++>
3 3
 #include "xdgcfg.hpp"
4 4
 
5
-int main(int argc, char *argv[])
5
+int main()
6 6
 {
7 7
     xdgcfg config("test.cfg", "xdgcfg");
8 8
     config.set_verbose(true);

+ 4
- 4
src/xdgcfg.cpp View File

@@ -29,7 +29,7 @@ xdgcfg::xdgcfg(const string &filename, const string &subdir)
29 29
     _filepath /= filename;
30 30
 }
31 31
 
32
-const uint_fast8_t xdgcfg::read()
32
+uint_fast8_t xdgcfg::read()
33 33
 {
34 34
     try
35 35
     {
@@ -57,7 +57,7 @@ const uint_fast8_t xdgcfg::read()
57 57
     return 0;
58 58
 }
59 59
 
60
-const bool xdgcfg::write()
60
+bool xdgcfg::write()
61 61
 {
62 62
     try
63 63
     {
@@ -86,12 +86,12 @@ const fs::path xdgcfg::get_filepath() const
86 86
     return _filepath;
87 87
 }
88 88
 
89
-const void xdgcfg::set_verbose(bool verbose)
89
+void xdgcfg::set_verbose(bool verbose)
90 90
 {
91 91
     _verbose = verbose;
92 92
 }
93 93
 
94
-const bool xdgcfg::get_verbose() const
94
+bool xdgcfg::get_verbose() const
95 95
 {
96 96
     return _verbose;
97 97
 }

+ 4
- 4
src/xdgcfg.hpp View File

@@ -43,14 +43,14 @@ public:
43 43
      *
44 44
      *  @return 0 on success, 1 on I/O error, 2 on parse error.
45 45
      */
46
-    const uint_fast8_t read();
46
+    uint_fast8_t read();
47 47
 
48 48
     /*!
49 49
      *  @brief  Write the file
50 50
      *
51 51
      *  @return `true` on success
52 52
      */
53
-    const bool write();
53
+    bool write();
54 54
 
55 55
     /*!
56 56
      *  @brief  Returns a reference to the config as libconfig::Config
@@ -70,12 +70,12 @@ public:
70 70
     /*!
71 71
      *  @brief  Sets verbosity
72 72
      */
73
-    const void set_verbose(bool verbose);
73
+    void set_verbose(bool verbose);
74 74
 
75 75
     /*!
76 76
      *  @brief  Returns verbosity
77 77
      */
78
-    const bool get_verbose() const;
78
+    bool get_verbose() const;
79 79
 
80 80
 private:
81 81
     /*!

Loading…
Cancel
Save