Skip to content

Commit 24d2aae

Browse files
author
Fytch
committed
remove unnecessary reference variables in callback.cxx
1 parent f4b68c0 commit 24d2aae

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/callback.cxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ TEST_CASE( "callback", "[ProgramOptions]" ) {
1010
po::string_t a_value_str{};
1111
std::size_t a_counter_1 = 0;
1212
std::size_t a_counter_2 = 0;
13-
auto&& a = parser[ "a" ]
13+
parser[ "a" ]
1414
.type( po::i32 )
1515
.callback( [ & ]( po::i32_t const& value ){ ++a_counter_1; a_value = value; } )
1616
.callback( [ & ]( po::string_t const& value ){ ++a_counter_2; a_value_str = value; } );
@@ -19,7 +19,7 @@ TEST_CASE( "callback", "[ProgramOptions]" ) {
1919
po::string_t b_value_str{};
2020
std::size_t b_counter_1 = 0;
2121
std::size_t b_counter_2 = 0;
22-
auto&& b = parser[ "b" ]
22+
parser[ "b" ]
2323
.type( po::i64 )
2424
.callback( [ & ]( po::i64_t const& value ){ ++b_counter_1; b_value = value; } )
2525
.callback( [ & ]( po::string_t const& value ){ ++b_counter_2; b_value_str = value; } );
@@ -28,7 +28,7 @@ TEST_CASE( "callback", "[ProgramOptions]" ) {
2828
po::string_t c_value_str{};
2929
std::size_t c_counter_1 = 0;
3030
std::size_t c_counter_2 = 0;
31-
auto&& c = parser[ "c" ]
31+
parser[ "c" ]
3232
.type( po::u32 )
3333
.callback( [ & ]( po::u32_t const& value ){ ++c_counter_1; c_value = value; } )
3434
.callback( [ & ]( po::string_t const& value ){ ++c_counter_2; c_value_str = value; } );
@@ -37,7 +37,7 @@ TEST_CASE( "callback", "[ProgramOptions]" ) {
3737
po::string_t d_value_str{};
3838
std::size_t d_counter_1 = 0;
3939
std::size_t d_counter_2 = 0;
40-
auto&& d = parser[ "d" ]
40+
parser[ "d" ]
4141
.type( po::u64 )
4242
.callback( [ & ]( po::u64_t const& value ){ ++d_counter_1; d_value = value; } )
4343
.callback( [ & ]( po::string_t const& value ){ ++d_counter_2; d_value_str = value; } );
@@ -46,7 +46,7 @@ TEST_CASE( "callback", "[ProgramOptions]" ) {
4646
po::string_t e_value_str{};
4747
std::size_t e_counter_1 = 0;
4848
std::size_t e_counter_2 = 0;
49-
auto&& e = parser[ "e" ]
49+
parser[ "e" ]
5050
.type( po::f32 )
5151
.callback( [ & ]( po::f32_t const& value ){ ++e_counter_1; e_value = value; } )
5252
.callback( [ & ]( po::string_t const& value ){ ++e_counter_2; e_value_str = value; } );
@@ -55,19 +55,19 @@ TEST_CASE( "callback", "[ProgramOptions]" ) {
5555
po::string_t f_value_str{};
5656
std::size_t f_counter_1 = 0;
5757
std::size_t f_counter_2 = 0;
58-
auto&& f = parser[ "f" ]
58+
parser[ "f" ]
5959
.type( po::f64 )
6060
.callback( [ & ]( po::f64_t const& value ){ ++f_counter_1; f_value = value; } )
6161
.callback( [ & ]( po::string_t const& value ){ ++f_counter_2; f_value_str = value; } );
6262

6363
po::string_t g_value{};
6464
std::size_t g_counter_1 = 0;
65-
auto&& g = parser[ "g" ]
65+
parser[ "g" ]
6666
.type( po::string )
6767
.callback( [ & ]( po::string_t const& value ){ ++g_counter_1; g_value = value; } );
6868

6969
std::size_t h_counter_1 = 0;
70-
auto&& h = parser[ "h" ]
70+
parser[ "h" ]
7171
.type( po::void_ )
7272
.callback( [ & ](){ ++h_counter_1; } );
7373

0 commit comments

Comments
 (0)