Skip to content

RefCounted, RunTimeTyped : Inline constructor and destructor #1478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
10.6.x.x (relative to 10.6.0.0a1)
========

Improvements
------------

- RefCounted, RunTimeTyped : Inlined constructor and destructor.

Breaking Changes
----------------

Expand Down
4 changes: 2 additions & 2 deletions include/IECore/RefCounted.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class IECORE_API RefCounted : private boost::noncopyable

typedef size_t RefCount;

RefCounted();
RefCounted() : m_numRefs( 0 ) {}

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

protected:

virtual ~RefCounted();
virtual ~RefCounted() {}

private :

Expand Down
4 changes: 2 additions & 2 deletions include/IECore/RunTimeTyped.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ class IECORE_API RunTimeTyped : public RefCounted

IE_CORE_DECLAREMEMBERPTR( RunTimeTyped );

RunTimeTyped();
~RunTimeTyped() override;
RunTimeTyped() {}
~RunTimeTyped() override {}

//! @name Type identification functions.
/// These functions provide useful queries about the typing
Expand Down
50 changes: 0 additions & 50 deletions src/IECore/RefCounted.cpp

This file was deleted.

8 changes: 0 additions & 8 deletions src/IECore/RunTimeTyped.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@ using namespace IECore;
RunTimeTyped::Mutex RunTimeTyped::g_baseTypeIdsMutex;
RunTimeTyped::Mutex RunTimeTyped::g_derivedTypeIdsMutex;

RunTimeTyped::RunTimeTyped()
{
}

RunTimeTyped::~RunTimeTyped()
{
}

TypeId RunTimeTyped::typeId() const
{
return staticTypeId();
Expand Down