Skip to content

Commit 9038ba7

Browse files
committed
constexpr Switches
1 parent 3c9c10f commit 9038ba7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/common/classes/Switches.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
namespace
2929
{
30-
const char switch_char = '-';
30+
constexpr char switch_char = '-';
3131
}
3232

3333
Switches::Switches(const in_sw_tab_t* table, FB_SIZE_T count, bool copy, bool minLength)
@@ -157,7 +157,7 @@ Switches::in_sw_tab_t* Switches::findSwitchMod(Firebird::string& sw, bool* inval
157157
return NULL;
158158
}
159159

160-
const Switches::in_sw_tab_t* Switches::getTable() const
160+
const Switches::in_sw_tab_t* Switches::getTable() const noexcept
161161
{
162162
return m_base;
163163
}

src/common/classes/Switches.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class Switches
7474
in_sw_tab_t* findSwitchMod(Firebird::string& sw, bool* invalidSwitchInd = 0);
7575

7676
// Get the same unmodifiable table that was passed as parameter to the constructor.
77-
const in_sw_tab_t* getTable() const;
77+
const in_sw_tab_t* getTable() const noexcept;
7878

7979
// Retrieve the modifiable copy of the table that was passed as parameter to the constructor.
8080
// It throws system_call_failed if "copy" was false in the constructor.

0 commit comments

Comments
 (0)