Whiteboard: minor refactoring, comments, cleanup
This commit is contained in:
parent
e661c1d5be
commit
dfedaa5376
3 changed files with 10 additions and 5 deletions
|
@ -32,7 +32,7 @@ namespace wb {
|
|||
|
||||
manager::manager():
|
||||
active_(false),
|
||||
mapbuilder_(NULL),
|
||||
mapbuilder_(),
|
||||
route_(),
|
||||
move_arrow_(),
|
||||
fake_unit_(),
|
||||
|
@ -128,6 +128,9 @@ void manager::erase_temp_move()
|
|||
if (move_arrow_)
|
||||
{
|
||||
move_arrow_.reset(); //auto-removes itself from display
|
||||
}
|
||||
if (fake_unit_)
|
||||
{
|
||||
resources::screen->remove_temporary_unit(fake_unit_.get());
|
||||
fake_unit_.reset();
|
||||
}
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
class arrow;
|
||||
|
@ -57,6 +57,7 @@ public:
|
|||
void apply_temp_modifiers();
|
||||
void remove_temp_modifiers();
|
||||
|
||||
/** Choose the target unit for action creation */
|
||||
void select_unit(unit& unit);
|
||||
void deselect_unit();
|
||||
|
||||
|
@ -67,7 +68,7 @@ public:
|
|||
|
||||
/**
|
||||
* Creates a move action for the current side,
|
||||
* and erases the stored route. The move is inserted
|
||||
* and erases the temp move. The move action is inserted
|
||||
* at the end of the queue, to be executed last.
|
||||
*/
|
||||
void save_temp_move();
|
||||
|
@ -78,7 +79,7 @@ private:
|
|||
*/
|
||||
bool active_;
|
||||
|
||||
std::auto_ptr<mapbuilder_visitor> mapbuilder_;
|
||||
boost::scoped_ptr<mapbuilder_visitor> mapbuilder_;
|
||||
|
||||
std::vector<map_location> route_;
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#ifndef WB_VISITOR_HPP_
|
||||
#define WB_VISITOR_HPP_
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
namespace wb
|
||||
|
@ -27,7 +28,7 @@ namespace wb
|
|||
class action;
|
||||
class move;
|
||||
|
||||
class visitor
|
||||
class visitor : private boost::noncopyable
|
||||
{
|
||||
public:
|
||||
visitor();
|
||||
|
|
Loading…
Add table
Reference in a new issue