Skip to content

Commit fc38ac6

Browse files
author
Clement Champetier
committed
Option: constructor takes a reference of AvOption
Use only references as parameters to have unified API.
1 parent eab5af0 commit fc38ac6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/AvTranscoder/option/Option.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ extern "C" {
1010
namespace avtranscoder
1111
{
1212

13-
Option::Option( AVOption* avOption, void* avContext )
14-
: _avOption( avOption )
13+
Option::Option( AVOption& avOption, void* avContext )
14+
: _avOption( &avOption )
1515
, _avContext( avContext )
1616
, _childOptions()
1717
, _defaultChildIndex( 0 )

src/AvTranscoder/option/Option.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ enum EOptionBaseType
3535
class Option
3636
{
3737
public:
38-
Option( AVOption* avOption, void* avContext );
38+
Option( AVOption& avOption, void* avContext );
3939
~Option() {}
4040

4141
EOptionBaseType getType() const;

src/AvTranscoder/option/context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void Context::loadOptions( void* av_class, int req_flags )
4747
continue;
4848
}
4949

50-
Option option( const_cast<AVOption*>( avOption ), av_class );
50+
Option option( *const_cast<AVOption*>( avOption ), av_class );
5151

5252
if( option.getType() == eOptionBaseTypeChild )
5353
{

0 commit comments

Comments
 (0)