Skip to content

Commit a0bc771

Browse files
committed
constexpr + noexcept in isc_s_proto
1 parent 0e9142c commit a0bc771

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/common/isc_s_proto.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ struct event_t
130130
class MemoryHeader
131131
{
132132
public:
133-
static const USHORT HEADER_VERSION = 2;
133+
static constexpr USHORT HEADER_VERSION = 2;
134134

135135
// Values for mhb_flags
136-
static const USHORT FLAG_DELETED = 1; // Shared file has been deleted
136+
static constexpr USHORT FLAG_DELETED = 1; // Shared file has been deleted
137137

138138
void init(USHORT type, USHORT version)
139139
{
@@ -149,12 +149,12 @@ class MemoryHeader
149149

150150
bool check(const char* name, USHORT type, USHORT version, bool raiseError = true) const;
151151

152-
void markAsDeleted()
152+
void markAsDeleted() noexcept
153153
{
154154
mhb_flags |= FLAG_DELETED;
155155
}
156156

157-
bool isDeleted() const
157+
bool isDeleted() const noexcept
158158
{
159159
return (mhb_flags & FLAG_DELETED);
160160
}
@@ -404,7 +404,7 @@ class SharedMutexGuard
404404
m_locked = false;
405405
}
406406

407-
bool isLocked() {
407+
bool isLocked() noexcept {
408408
return m_locked;
409409
}
410410

0 commit comments

Comments
 (0)