Skip to content

Commit 1a46e37

Browse files
authored
Merge pull request #1478 from johnhaddon/inlining
RefCounted, RunTimeTyped : Inline constructor and destructor
2 parents be0a2e4 + 4e11e80 commit 1a46e37

File tree

5 files changed

+9
-62
lines changed

5 files changed

+9
-62
lines changed

Changes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
10.6.x.x (relative to 10.6.0.0a1)
22
========
33

4+
Improvements
5+
------------
6+
7+
- RefCounted, RunTimeTyped : Inlined constructor and destructor.
8+
49
Breaking Changes
510
----------------
611

include/IECore/RefCounted.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class IECORE_API RefCounted : private boost::noncopyable
132132

133133
typedef size_t RefCount;
134134

135-
RefCounted();
135+
RefCounted() : m_numRefs( 0 ) {}
136136

137137
/// Add a reference to the current object
138138
inline void addRef() const { m_numRefs++; };
@@ -152,7 +152,7 @@ class IECORE_API RefCounted : private boost::noncopyable
152152

153153
protected:
154154

155-
virtual ~RefCounted();
155+
virtual ~RefCounted() {}
156156

157157
private :
158158

include/IECore/RunTimeTyped.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ class IECORE_API RunTimeTyped : public RefCounted
218218

219219
IE_CORE_DECLAREMEMBERPTR( RunTimeTyped );
220220

221-
RunTimeTyped();
222-
~RunTimeTyped() override;
221+
RunTimeTyped() {}
222+
~RunTimeTyped() override {}
223223

224224
//! @name Type identification functions.
225225
/// These functions provide useful queries about the typing

src/IECore/RefCounted.cpp

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/IECore/RunTimeTyped.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@ using namespace IECore;
4646
RunTimeTyped::Mutex RunTimeTyped::g_baseTypeIdsMutex;
4747
RunTimeTyped::Mutex RunTimeTyped::g_derivedTypeIdsMutex;
4848

49-
RunTimeTyped::RunTimeTyped()
50-
{
51-
}
52-
53-
RunTimeTyped::~RunTimeTyped()
54-
{
55-
}
56-
5749
TypeId RunTimeTyped::typeId() const
5850
{
5951
return staticTypeId();

0 commit comments

Comments
 (0)