Skip to content

Commit 4f8c297

Browse files
committed
constexpr in WorkerAttachment
1 parent 6ceb420 commit 4f8c297

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/jrd/WorkerAttachment.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ using namespace Firebird;
4545
namespace Jrd {
4646

4747

48-
const unsigned WORKER_IDLE_TIMEOUT = 60; // 1 minute
48+
constexpr unsigned WORKER_IDLE_TIMEOUT = 60; // 1 minute
4949

5050
/// class WorkerStableAttachment
5151

@@ -440,7 +440,7 @@ bool WorkerAttachment::detachIdle(StableAttachmentPart* sAtt)
440440
{ // scope
441441
AttSyncLockGuard attGuard(sAtt->getSync(), FB_FUNCTION);
442442

443-
Attachment* att = sAtt->getHandle();
443+
const Attachment* att = sAtt->getHandle();
444444
if (!att || att->att_use_count > 0)
445445
return false;
446446

src/jrd/WorkerAttachment.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,9 @@ class WorkerContextHolder : public Jrd::DatabaseContextHolder, public Jrd::Attac
7474
{
7575
}
7676

77-
private:
7877
// copying is prohibited
79-
WorkerContextHolder(const WorkerContextHolder&);
80-
WorkerContextHolder& operator=(const WorkerContextHolder&);
78+
WorkerContextHolder(const WorkerContextHolder&) = delete;
79+
WorkerContextHolder& operator=(const WorkerContextHolder&) = delete;
8180
};
8281

8382

0 commit comments

Comments
 (0)