[vlc-devel] commit: skins: cosmetics about previous patch (thanks ivoire) (Erwan Tulou )
git version control
git at videolan.org
Tue Jan 5 23:34:46 CET 2010
vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Tue Jan 5 22:58:49 2010 +0100| [e4fb5cd250f211d3ff9ce713a03d70080532fbbc] | committer: Erwan Tulou
skins: cosmetics about previous patch (thanks ivoire)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e4fb5cd250f211d3ff9ce713a03d70080532fbbc
---
modules/gui/skins2/src/theme_repository.cpp | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/modules/gui/skins2/src/theme_repository.cpp b/modules/gui/skins2/src/theme_repository.cpp
index 019ebe1..13ed502 100644
--- a/modules/gui/skins2/src/theme_repository.cpp
+++ b/modules/gui/skins2/src/theme_repository.cpp
@@ -73,18 +73,16 @@ ThemeRepository::ThemeRepository( intf_thread_t *pIntf ): SkinObject( pIntf )
parseDirectory( *it );
}
- // retrieve skins for skins directories and locate default skins
+ // retrieve skins from skins directories and locate default skins
map<string,string>::const_iterator itmap, itdefault;
for( itmap = m_skinsMap.begin(); itmap != m_skinsMap.end(); itmap++ )
{
string path = itmap->first;
string name = itmap->second;
- val.psz_string = strdup( path.c_str() );
- text.psz_string = strdup( name.c_str() );
+ val.psz_string = (char*) path.c_str();
+ text.psz_string = (char*) name.c_str();
var_Change( getIntf(), "intf-skins", VLC_VAR_ADDCHOICE, &val,
&text );
- free( val.psz_string );
- free( text.psz_string );
if( name == "default" )
itdefault = itmap;
@@ -105,19 +103,16 @@ ThemeRepository::ThemeRepository( intf_thread_t *pIntf ): SkinObject( pIntf )
itmap = m_skinsMap.find( current );
if( itmap == m_skinsMap.end() )
{
- val.psz_string = strdup( current.c_str() );
- text.psz_string = strdup( current.c_str() );
+ val.psz_string = (char*) current.c_str();
+ text.psz_string = (char*) current.c_str();
var_Change( getIntf(), "intf-skins", VLC_VAR_ADDCHOICE, &val,
&text );
var_Change( getIntf(), "intf-skins", VLC_VAR_SETVALUE, &val, NULL );
- free( val.psz_string );
- free( text.psz_string );
}
else
{
- val.psz_string = strdup( current.c_str() );
+ val.psz_string = (char*) current.c_str();
var_Change( getIntf(), "intf-skins", VLC_VAR_SETVALUE, &val, NULL );
- free( val.psz_string );
}
free( psz_current );
m_skinsMap.clear();
More information about the vlc-devel
mailing list