Base64: realize decode() as template function

In Base64::decode() we mess around with pointers so it's more type-safe
to realize everything as a template function. This also silences compiler
warning about dereferencing type-punned pointer in Vibed plugin.
(cherry picked from commit 81cea79c38)
This commit is contained in:
Tobias Doerffel
2009-12-26 01:00:36 +01:00
parent 93eb03612d
commit 3348a4378f
2 changed files with 7 additions and 7 deletions

View File

@@ -241,7 +241,7 @@ void vibed::loadSettings( const QDomElement & _this )
float * shp = 0;
base64::decode( _this.attribute( "graph" +
QString::number( i ) ),
(char * *) &shp,
&shp,
&size );
// TODO: check whether size == 128 * sizeof( float ),
// otherwise me might and up in a segfault