Remove useless variable declaration

This commit is contained in:
zvon 2020-04-16 13:44:54 +02:00
parent c899157006
commit 791e71fbd8

View File

@ -217,19 +217,17 @@ private:
static int insert_val_s( void *d, int argc, char **argv,
char ** /*UNUSED*/ ) {
auto &data = *static_cast< std::string * >( d );
if ( argc > 0 ) {
data = argv[0] ? argv[0] : "";
}
if ( argc > 0 )
*static_cast< std::string * >( d ) = argv[0] ? argv[0] : "";
return 0;
}
#ifdef WIN32
static int insert_val_ws( void *d, int argc, char **argv,
char ** /*UNUSED*/ ) {
auto &data = *static_cast< std::wstring * >( d );
if ( argc > 0 ) {
data = argv[0] ? _8_2_w( argv[0] ) : L"";
*static_cast< std::wstring * >( d ) =
argv[0] ? _8_2_w( argv[0] ) : L"";
}
return 0;
}