Doxygen and other comment formatting

This commit is contained in:
Ignacio R. Morelle 2015-09-01 16:47:00 -03:00
parent 2e574252cb
commit 39033be9d3
2 changed files with 19 additions and 6 deletions

View file

@ -1,6 +1,6 @@
/*
Copyright (C) 2015 - 2015 by David White <dave@whitevine.net>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
Copyright (C) 2015 by the Battle for Wesnoth Project
<http://www.wesnoth.org/>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -21,6 +21,7 @@
int quit_confirmation::count_ = 0;
bool quit_confirmation::open_ = false;
void quit_confirmation::quit()
{
if(count_ != 0 && display::get_singleton() && !open_)

View file

@ -1,6 +1,6 @@
/*
Copyright (C) 2015 - 2015 by David White <dave@whitevine.net>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
Copyright (C) 2015 by the Battle for Wesnoth Project
<http://www.wesnoth.org/>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -19,16 +19,28 @@ class CVideo;
#include <cassert>
/// Any object of this type will prevent the game from quitting immediately, instad a confirmation dialog will pop up when attepmting to close.
/**
* Implements a quit confirmation dialog.
*
* Any object of this type will prevent the game from quitting immediately.
* Instead, a confirmation dialog will pop up when attempting to close.
*/
class quit_confirmation
{
public:
quit_confirmation() { ++count_; }
quit_confirmation(const quit_confirmation&) { ++count_; }
~quit_confirmation() { --count_; assert(count_ >= 0); }
/// Shows the quit confirmation if needed, throws CVideo::quit to exit.
/**
* Shows the quit confirmation if needed.
*
* @throws CVideo::quit If the user chooses to quit or no prompt was
* displayed.
*/
static void quit();
static void quit(CVideo& video );
private:
static int count_;
static bool open_;