1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-29 05:38:00 +00:00

games/scorched3d: Fix build on 12.0-CURRENT

../../common/weapons/AccessoryStore.cpp:158:64: error: cannot initialize return object of type 'AccessoryPart *' with an rvalue of type 'bool'
        if (!currentNode->getNamedParameter("type", typeNode)) return false;
                                                                      ^~~~~

http://beefy12.nyi.freebsd.org/data/head-amd64-default/p475478_s336801/logs/errors/scorched3d-0.43.3d_11.log
This commit is contained in:
Tobias Kortkamp 2018-07-30 10:07:28 +00:00
parent d915e75c90
commit 1ea6d09b08
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=475878

View File

@ -0,0 +1,15 @@
../../common/weapons/AccessoryStore.cpp:158:64: error: cannot initialize return object of type 'AccessoryPart *' with an rvalue of type 'bool'
if (!currentNode->getNamedParameter("type", typeNode)) return false;
^~~~~
--- src/common/weapons/AccessoryStore.cpp.orig 2018-07-30 09:52:29 UTC
+++ src/common/weapons/AccessoryStore.cpp
@@ -155,7 +155,7 @@ AccessoryPart *AccessoryStore::createAccessoryPart(
Accessory *parent, XMLNode *currentNode)
{
XMLNode *typeNode = 0;
- if (!currentNode->getNamedParameter("type", typeNode)) return false;
+ if (!currentNode->getNamedParameter("type", typeNode)) return 0;
AccessoryPart *accessoryPart =
AccessoryMetaRegistration::getNewAccessory(typeNode->getContent(), this);