Changeset View
Changeset View
Standalone View
Standalone View
files/0003-Cast-const-char-in-sdl_font.cpp.patch
- This file was added.
| diff --git a/src/sdl_font.cpp b/src/sdl_font.cpp | |||||
| index 700a04619d..6736014deb 100644 | |||||
| --- a/src/sdl_font.cpp | |||||
| +++ b/src/sdl_font.cpp | |||||
| @@ -22,14 +22,14 @@ static int test_face_size( const std::string &f, int size, int faceIndex ) | |||||
| { | |||||
| const TTF_Font_Ptr fnt( TTF_OpenFontIndex( f.c_str(), size, faceIndex ) ); | |||||
| if( fnt ) { | |||||
| - char *style = TTF_FontFaceStyleName( fnt.get() ); | |||||
| + char *style = const_cast<char*>(TTF_FontFaceStyleName( fnt.get() )); | |||||
| if( style != nullptr ) { | |||||
| int faces = TTF_FontFaces( fnt.get() ); | |||||
| for( int i = faces - 1; i >= 0; i-- ) { | |||||
| const TTF_Font_Ptr tf( TTF_OpenFontIndex( f.c_str(), size, i ) ); | |||||
| char *ts = nullptr; | |||||
| if( tf ) { | |||||
| - if( nullptr != ( ts = TTF_FontFaceStyleName( tf.get() ) ) ) { | |||||
| + if( nullptr != ( ts = const_cast<char*>(TTF_FontFaceStyleName( tf.get() ) ) ) ) { | |||||
| if( 0 == strcasecmp( ts, style ) && TTF_FontHeight( tf.get() ) <= size ) { | |||||
| return i; | |||||
| } | |||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.