← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/fh1-multitexture into lp:widelands

 

I got some compile warning we should not neglect:

fh1-multitexture/src/graphic/text/transient_cache.h:48:2: warning: 'TransientCache<Image>' has virtual functions but non-virtual
      destructor [-Wnon-virtual-dtor]
        ~TransientCache();

in general when subclassing and using a parent pointer the correct Destructor will not be called.

fh1-multitexture/src/logic/editor_game_base.h:39:1: warning: struct 'FullscreenMenuLaunchGame' was previously declared as a class
      [-Wmismatched-tags]
struct FullscreenMenuLaunchGame;
^
fh1-multitexture/src/ui_fsmenu/launch_game.h:44:7: note: previous use is here
class FullscreenMenuLaunchGame : public FullscreenMenuBase {


fh1-multitexture/src/network/network.h:122:9: warning: struct 'Deserializer' was previously declared as a class [-Wmismatched-tags]
        friend struct Deserializer;
               ^
fh1-multitexture/src/network/network.h:36:7: note: previous use is here
class Deserializer;


Are there functions limited to float only?

fh1-multitexture/src/logic/map_objects/map_object.cc:468:40: warning: implicit conversion increases floating-point precision: 'float' to 'double' [-Wdouble-promotion]
        scale = std::round(2 * (scale > 1.f ? std::sqrt(scale) : std::pow(scale, 2))) / 2;

No idea about these, SirVer may tell us?

fh1-multitexture/src/graphic/font_handler1.cc:90:48: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
                        rendered_text = render_cache_->insert(hash, std::move(rt_renderer_->render(text, w)));
                                                                    ^
fh1-multitexture/src/graphic/font_handler1.cc:90:48: note: remove std::move call here
                        rendered_text = render_cache_->insert(hash, std::move(rt_renderer_->render(text, w)));

Sorry no time to check more code tonight, will just play that branch a bit ....


-- 
https://code.launchpad.net/~widelands-dev/widelands/fh1-multitexture/+merge/323903
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/fh1-multitexture.


References