Add documentation for my last commit.

This commit is contained in:
Mark de Wever 2009-01-24 17:38:46 +00:00
parent 88675c4465
commit 9e7d0ca379

View file

@ -2832,6 +2832,14 @@ unit_map::iterator handle_speaker(
return speaker;
}
/**
* Helper to handle the image part of the message.
*
* @param cfg cfg of message.
* @param speaker The speaker of the message.
*
* @returns The image to show.
*/
std::string get_image(const vconfig& cfg, unit_map::iterator speaker)
{
std::string image = cfg["image"];
@ -2849,6 +2857,14 @@ std::string get_image(const vconfig& cfg, unit_map::iterator speaker)
return image;
}
/**
* Helper to handle the caption part of the message.
*
* @param cfg cfg of message.
* @param speaker The speaker of the message.
*
* @returns The caption to show.
*/
std::string get_caption(const vconfig& cfg, unit_map::iterator speaker)
{
std::string caption = cfg["caption"];