Reformat cStringChoice constructors

This commit is contained in:
2025-02-22 23:11:30 -05:00
committed by Celtic Minstrel
parent 36dc44ad1c
commit 719f7dcf47

View File

@@ -19,22 +19,17 @@ static DialogDefn& loadDefn() {
return *ResMgr::dialogs.get("choose-string");
}
cStringChoice::cStringChoice(
std::vector<std::string>& strs,
std::string title,
cDialog* parent
) : dlg(loadDefn(),parent) {
cStringChoice::cStringChoice(std::vector<std::string>& strs, std::string title, cDialog* parent)
: dlg(loadDefn(),parent)
{
if(!title.empty()) dlg["title"].setText(title);
strings = strs;
attachHandlers();
}
cStringChoice::cStringChoice(
std::vector<std::string>::iterator begin,
std::vector<std::string>::iterator end,
std::string title,
cDialog* parent
) : dlg(loadDefn(),parent) {
cStringChoice::cStringChoice(std::vector<std::string>::iterator begin, std::vector<std::string>::iterator end, std::string title, cDialog* parent)
: dlg(loadDefn(),parent)
{
if(!title.empty()) dlg["title"].setText(title);
copy(begin,end,std::inserter(strings, strings.begin()));
attachHandlers();