← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/bug-1332627 into lp:widelands

 

I did the change to the macro.

struct ITransportCostCalculator  {
	virtual ~ITransportCostCalculator() {}

	virtual int32_t calc_cost_estimate(Coords, Coords) const = 0;
	DISALLOW_COPY_AND_ASSIGN(ITransportCostCalculator);
	TypeName() = default;
};

results in:

[  5%] Building CXX object src/wui/CMakeFiles/wui.dir/actionconfirm.cc.o
In file included from /home/bratzbert/sources/widelands/bug-1332627/src/logic/map.h:31:0,
                 from /home/bratzbert/sources/widelands/bug-1332627/src/logic/editor_game_base.h:31,
                 from /home/bratzbert/sources/widelands/bug-1332627/src/logic/player.h:27,
                 from /home/bratzbert/sources/widelands/bug-1332627/src/wui/actionconfirm.cc:28:
/home/bratzbert/sources/widelands/bug-1332627/src/economy/itransport_cost_calculator.h:40:15: error: ISO C++ forbids declaration of ‘TypeName’ with no type [-fpermissive]
/home/bratzbert/sources/widelands/bug-1332627/src/economy/itransport_cost_calculator.h:40:15: error: ‘int Widelands::ITransportCostCalculator::TypeName()’ cannot be defaulted


=========================

struct ITransportCostCalculator  {
	virtual ~ITransportCostCalculator() {}

	virtual int32_t calc_cost_estimate(Coords, Coords) const = 0;
	DISALLOW_COPY_AND_ASSIGN(ITransportCostCalculator);
};

results in:

[ 19%] Building CXX object src/logic/CMakeFiles/logic.dir/map.cc.o
/home/bratzbert/sources/widelands/bug-1332627/src/logic/map.cc: In constructor ‘Widelands::Map::Map()’:
/home/bratzbert/sources/widelands/bug-1332627/src/logic/map.cc:73:39: error: no matching function for call to ‘Widelands::ITransportCostCalculator::ITransportCostCalculator()’
/home/bratzbert/sources/widelands/bug-1332627/src/logic/map.cc:73:39: note: candidate is:
In file included from /home/bratzbert/sources/widelands/bug-1332627/src/logic/map.h:31:0,
                 from /home/bratzbert/sources/widelands/bug-1332627/src/logic/map.cc:20:
/home/bratzbert/sources/widelands/bug-1332627/src/economy/itransport_cost_calculator.h:39:2: note: Widelands::ITransportCostCalculator::ITransportCostCalculator(const Widelands::ITransportCostCalculator&) <deleted>
/home/bratzbert/sources/widelands/bug-1332627/src/economy/itransport_cost_calculator.h:39:2: note:   candidate expects 1 argument, 0 provided

-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1332627/+merge/226628
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1332627.


References