forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x11-misc/fbdesk: Allow for compiling with GCC 6
Gentoo-bug: 594052 * EAPI=6 Package-Manager: portage-2.3.0
- Loading branch information
1 parent
b04670c
commit 8695c00
Showing
4 changed files
with
35 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Fix building with C++14, which errors out due to bool -> T* conversions | ||
See also: https://bugs.gentoo.org/show_bug.cgi?id=594052 | ||
|
||
--- a/src/FbTk/Image.cc | ||
+++ b/src/FbTk/Image.cc | ||
@@ -85,14 +85,14 @@ | ||
|
||
|
||
if (filename == "") | ||
- return false; | ||
+ return NULL; | ||
|
||
// determine file ending | ||
std::string extension(StringUtil::toUpper(StringUtil::findExtension(filename))); | ||
|
||
// valid handle? | ||
if (s_image_map.find(extension) == s_image_map.end()) | ||
- return false; | ||
+ return NULL; | ||
|
||
// load file | ||
PixmapWithMask *pm = s_image_map[extension]->load(filename, screen_num); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters