Skip to content

Commit c8166f0

Browse files
committed
constexpr + noexcept in fb_types.h
1 parent 28c2329 commit c8166f0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/include/fb_types.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@
3939
/* EKU: Firebird requires (S)LONG to be 32 bit */
4040
typedef int SLONG;
4141
typedef unsigned int ULONG;
42-
const SLONG SLONG_MIN = INT_MIN;
43-
const SLONG SLONG_MAX = INT_MAX;
42+
inline constexpr SLONG SLONG_MIN = INT_MIN;
43+
inline constexpr SLONG SLONG_MAX = INT_MAX;
4444
#elif SIZEOF_LONG == 4
4545
typedef long SLONG;
4646
typedef unsigned long ULONG;
47-
const SLONG SLONG_MIN = LONG_MIN;
48-
const SLONG SLONG_MAX = LONG_MAX;
47+
inline constexpr SLONG SLONG_MIN = LONG_MIN;
48+
inline constexpr SLONG SLONG_MAX = LONG_MAX;
4949
#else
5050
#error compile_time_failure: SIZEOF_LONG not specified
5151
#endif
@@ -81,20 +81,20 @@ typedef FB_UINT64 ISC_UINT64;
8181

8282
typedef ISC_QUAD SQUAD;
8383

84-
const SQUAD NULL_BLOB = { 0, 0 };
84+
inline constexpr SQUAD NULL_BLOB = { 0, 0 };
8585

86-
inline bool operator==(const SQUAD& s1, const SQUAD& s2)
86+
inline bool operator==(const SQUAD& s1, const SQUAD& s2) noexcept
8787
{
8888
return s1.gds_quad_high == s2.gds_quad_high &&
8989
s2.gds_quad_low == s1.gds_quad_low;
9090
}
9191

92-
inline bool operator!=(const SQUAD& s1, const SQUAD& s2)
92+
inline bool operator!=(const SQUAD& s1, const SQUAD& s2) noexcept
9393
{
9494
return !(s1 == s2);
9595
}
9696

97-
inline bool operator>(const SQUAD& s1, const SQUAD& s2)
97+
inline bool operator>(const SQUAD& s1, const SQUAD& s2) noexcept
9898
{
9999
return (s1.gds_quad_high > s2.gds_quad_high) ||
100100
(s1.gds_quad_high == s2.gds_quad_high &&

0 commit comments

Comments
 (0)