Why is virtual function not being called?

后端 未结 6 1868
挽巷
挽巷 2021-01-26 07:00
//GUITEXT
class guitext : public entity {
public:
    guitext(graphics *gfx, std::string _text, float _x, float _y, 
        float _size, float timeToLive);
    bool upd         


        
6条回答
  •  抹茶落季
    2021-01-26 07:39

    In addition, in your case it's not good idea to pass arguments by value, i suppose there will be very big quantity of objects that need to be redrawed. Better, by const reference, since functon doesn't change state of passed object inside.

提交回复
热议问题