Skip to content

Commit

Permalink
CF::Object< T > - Removed overloads for CFTypeRef.
Browse files Browse the repository at this point in the history
  • Loading branch information
macmade committed Mar 11, 2019
1 parent 98b5387 commit 02dca49
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 51 deletions.
13 changes: 0 additions & 13 deletions CF++/include/CF++/CFPP-Object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ namespace CF
}
}

Object( CFTypeRef value ): _cfObject( NULL )
{
if( value != NULL )
{
this->_cfObject = reinterpret_cast< _T_ >( const_cast< void * >( CFRetain( value ) ) );
}
}

Object( _T_ value ): _cfObject( NULL )
{
if( value != NULL )
Expand Down Expand Up @@ -108,11 +100,6 @@ namespace CF
return operator =( Object< _T_ >( value ) );
}

Object< _T_ > & operator = ( CFTypeRef value )
{
return operator =( Object< _T_ >( value ) );
}

Object< _T_ > & operator = ( _T_ value )
{
return operator =( Object< _T_ >( value ) );
Expand Down
38 changes: 0 additions & 38 deletions Unit-Tests/Test-CFPP-Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,6 @@ TEST( CFPP_Object, CTOR_AutoPointer )
ASSERT_FALSE( o2.IsValid() );
}

TEST( CFPP_Object, CTOR_CFType )
{
CFBagRef cfB;

cfB = CFBagCreate( NULL, NULL, 0, NULL );

{
CF::Object< CFBagRef > o1( static_cast< CFTypeRef >( cfB ) );
CF::Object< CFBagRef > o2( static_cast< CFTypeRef >( NULL ) );

ASSERT_TRUE( o1.IsValid() );
ASSERT_FALSE( o2.IsValid() );
}

CFRelease( cfB );
}

TEST( CFPP_Object, CTOR_CFBag )
{
CFBagRef cfB;
Expand Down Expand Up @@ -161,27 +144,6 @@ TEST( CFPP_Object, OperatorAssignAutoPointer )
ASSERT_TRUE( o1.IsValid() );
}

TEST( CFPP_Object, OperatorAssignCFType )
{
CFBagRef cfB;

cfB = CFBagCreate( NULL, NULL, 0, NULL );

{
CF::Object< CFBagRef > o1;

o1 = static_cast< CFTypeRef >( cfB );

ASSERT_TRUE( o1.IsValid() );

o1 = static_cast< CFTypeRef >( NULL );

ASSERT_FALSE( o1.IsValid() );
}

CFRelease( cfB );
}

TEST( CFPP_Object, OperatorAssignCFBag )
{
CFBagRef cfB;
Expand Down

0 comments on commit 02dca49

Please sign in to comment.