Ever since I read this, I started adding my own comments from time to time. xD Here's one from the other day:
// this is actually a useless and unnecessary class, but my OCD would go haywire otherwise
It's about a class that basically just inherits another class and passes on a parameter to the superclass's constructor.
#ifndef MENU_OVERLAY_DIALOG_H
#define MENU_OVERLAY_DIALOG_H
#include <hltypes/hmap.h>
#include <hltypes/hstring.h>
#include <scedge/MenuDialog.h>
namespace Menu
{
namespace Overlay
{
// this is actually a useless and unnecessary class, but my OCD would go haywire otherwise
class Dialog : public scedge::MenuDialog
{
public:
Dialog();
~Dialog();
protected:
SCEDGE_DECLARE_INPUT(Dialog);
};
}
}
#endif
#include <hltypes/harray.h>
#include <hltypes/hmap.h>
#include <hltypes/hstring.h>
#include <scedge/SceneManager.h>
#include "Menu/Overlay/Dialog.h"
namespace Menu
{
namespace Overlay
{
SCEDGE_DEFINE_INPUT(Dialog, scedge::MenuDialog)
/****************************************************************************************
* Construct/Destruct
****************************************************************************************/
Dialog::Dialog() : scedge::MenuDialog("menu/overlay/dialog")
{
}
Dialog::~Dialog()
{
}
}
}
This could have been done the same way without the class, but every "overlay menu" that I use has a subclass like this.