Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3a5bc3a

Browse files
constexpr+noexcept PluginLogWriter
1 parent 90606b0 commit 3a5bc3a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

‎src/utilities/ntrace/PluginLogWriter.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void strerror_r(int err, char* buf, size_t bufSize)
5353
}
5454
#endif
5555

56-
void getMappedFileName(PathName& file, PathName& mapFile)
56+
void getMappedFileName(constPathName& file, PathName& mapFile)
5757
{
5858
const ULONG hash = file.hash(0xFFFFFFFF);
5959
mapFile.printf("%s_%08x", FB_TRACE_LOG_MUTEX, hash);
@@ -239,7 +239,7 @@ FB_SIZE_T PluginLogWriter::write_s(CheckStatusWrapper* status, const void* buf,
239239
{
240240
return write(buf, size);
241241
}
242-
catch (Exception &ex)
242+
catch (constException &ex)
243243
{
244244
ex.stuffException(status);
245245
}
@@ -264,7 +264,7 @@ void PluginLogWriter::checkErrno(const char* operation)
264264
operation, m_fileName.c_str(), strErr);
265265
}
266266

267-
void PluginLogWriter::mutexBug(int state, const TEXT* string)
267+
void PluginLogWriter::mutexBug(int state, const char* string)
268268
{
269269
TEXT msg[BUFFER_TINY];
270270
snprintf(msg, sizeof(msg), "PluginLogWriter: mutex %s error, status = %d", string, state);
@@ -292,11 +292,11 @@ void PluginLogWriter::unlock()
292292
}
293293

294294

295-
const unsigned int IDLE_TIMEOUT = 30; // seconds
295+
constexpr unsigned int IDLE_TIMEOUT = 30; // seconds
296296

297297
void PluginLogWriter::setupIdleTimer(bool clear)
298298
{
299-
unsigned int timeout = clear ? 0 : IDLE_TIMEOUT;
299+
constunsigned int timeout = clear ? 0 : IDLE_TIMEOUT;
300300
if (!timeout)
301301
{
302302
if (m_idleTimer)

‎src/utilities/ntrace/PluginLogWriter.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ class PluginLogWriter final :
6262
~PluginLogWriter();
6363

6464
// TraceLogWriter implementation
65-
virtualFB_SIZE_T write(const void* buf, FB_SIZE_T size) override;
66-
virtualFB_SIZE_T write_s(Firebird::CheckStatusWrapper* status, const void* buf, unsigned size) override;
65+
FB_SIZE_T write(const void* buf, FB_SIZE_T size) override;
66+
FB_SIZE_T write_s(Firebird::CheckStatusWrapper* status, const void* buf, FB_SIZE_T size) override;
6767

6868
private:
69-
const USHORT PLUGIN_LOG_VERSION = 1;
69+
staticconstexpr USHORT PLUGIN_LOG_VERSION = 1;
7070

7171
SINT64 seekToEnd();
7272
void reopen();

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /