[Scummvm-git-logs] scummvm master -> 1b06923793de5c12cd3c9c581e567add2346803c
dwatteau
noreply at scummvm.org
Fri Nov 15 13:26:04 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1b06923793 QDENGINE: Fix qdInventoryCellSet::put_object() build error on OpenBSD
Commit: 1b06923793de5c12cd3c9c581e567add2346803c
https://github.com/scummvm/scummvm/commit/1b06923793de5c12cd3c9c581e567add2346803c
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2024-11-15T14:22:37+01:00
Commit Message:
QDENGINE: Fix qdInventoryCellSet::put_object() build error on OpenBSD
This is meant to return a bool; the NULL used there triggers a build error
on (at least) OpenBSD/7.5 with default clang++:
error: cannot initialize return object of type 'bool' with an rvalue of type 'std::nullptr_t'
return NULL;
^~~~
/usr/include/sys/_null.h:12:14: note: expanded from macro 'NULL'
^~~~~~~
Introduced in commit d9de39b8c2d16096f9b5d74feeb0c9474f7d6627.
Changed paths:
engines/qdengine/qdcore/qd_inventory_cell.cpp
diff --git a/engines/qdengine/qdcore/qd_inventory_cell.cpp b/engines/qdengine/qdcore/qd_inventory_cell.cpp
index c416abdb8c5..6a4aa7b366f 100644
--- a/engines/qdengine/qdcore/qd_inventory_cell.cpp
+++ b/engines/qdengine/qdcore/qd_inventory_cell.cpp
@@ -264,7 +264,7 @@ bool qdInventoryCellSet::put_object(qdGameObjectAnimated *p, const Vect2s &pos)
if (!hit(pos)) return false;
if (_cells.front().size_x() == 0 || _cells.front().size_y() == 0)
- return NULL;
+ return false;
Vect2s v = pos - screen_pos() + _cells.front().size() / 2;
int idx = v.x / _cells.front().size_x() + (v.y / _cells.front().size_y()) * _size.x;
More information about the Scummvm-git-logs
mailing list