GothicKit / ZenKit

A re-implementation of file formats used by the early 2000's ZenGin
http://zk.gothickit.dev/
MIT License
44 stars 9 forks source link

Build error on Ubuntu/GCC #34

Closed Try closed 1 year ago

Try commented 1 year ago

https://github.com/lmichaelis/phoenix/blob/0c29d03205a7bbf0ca5200a683a30be0157e43b8/include/phoenix/mesh.hh#L45 Last good revision: 32770f8dbb693c340a5247e156b7d0f68bbf584a Blamed: 1957cbb823f51141783f163af5a1a9dc4a9dc72f

-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
...
[ 40%] Building CXX object lib/phoenix/CMakeFiles/phoenix.dir/source/animation.cc.o
In file included from /home/appveyor/projects/opengothic/lib/phoenix/include/phoenix/animation.hh:6,
                 from /home/appveyor/projects/opengothic/lib/phoenix/source/animation.cc:3:
/home/appveyor/projects/opengothic/lib/phoenix/include/phoenix/mesh.hh:45:49: error: ‘bool phoenix::polygon_flags::operator==(const phoenix::polygon_flags&) const’ cannot be defaulted
   45 |   bool operator==(const polygon_flags&) const = default;
      |                                                 ^~~~~~~
make[3]: *** [lib/phoenix/CMakeFiles/phoenix.dir/build.make:76: lib/phoenix/CMakeFiles/phoenix.dir/source/animation.cc.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:709: lib/phoenix/CMakeFiles/p

Also this operator appears to be unused, probably it would be good to remove this line.

lmichaelis commented 1 year ago

@Try I've added a fix.

Try commented 1 year ago

Fix works for OpenGothic. Also I've give a run for bool operator==(const polygon_flags&) const = delete - seems to be fine as well. Is this operator needed after all?

PS Nitpick: no bool operator!= to math ==

lmichaelis commented 1 year ago

It is required for the test suite.