mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-21 05:04:58 +01:00
test: stub basic_node::radius_() for GCC and Clang
The Linux build failed to link the unit tests: undefined reference to scene::basic_node::radius_() from basic_node's vtable in engine_stubs.o. basic_node has no key function for the Itanium C++ ABI (tooltip() is declared plain but defined inline in the header), so GCC and Clang emit its vtable in every unit using scenenode.h, and the vtable needs radius_(), defined in scenenode.cpp, which the tests don't link. MSVC emits vtables differently, so the Windows build linked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -68,4 +68,11 @@ layer_handle node_layers::close() {
|
|||||||
|
|
||||||
void node_layers::instance_begin(std::string const &, source_span const &) {}
|
void node_layers::instance_begin(std::string const &, source_span const &) {}
|
||||||
|
|
||||||
|
// basic_node has no key function for the Itanium C++ ABI (tooltip() is declared plain but defined inline), so
|
||||||
|
// GCC and Clang emit its vtable wherever scenenode.h is used, here too, and the vtable wants radius_().
|
||||||
|
// the same as the game's, in scene/scenenode.cpp
|
||||||
|
float basic_node::radius_() {
|
||||||
|
return 0.f;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace scene
|
} // namespace scene
|
||||||
|
|||||||
Reference in New Issue
Block a user