Merge the two "load from file" constructors in cDialog (using defaulted parameter)

This commit is contained in:
2014-12-06 01:15:30 -05:00
parent 9e734d5c47
commit d35b2137be
2 changed files with 1 additions and 6 deletions

View File

@@ -726,10 +726,6 @@ template<> pair<string,cTextField*> cDialog::parse(Element& who /*field*/){
cDialog::cDialog(cDialog* p) : parent(p) {}
cDialog::cDialog(std::string path) : parent(NULL) {
loadFromFile(path);
}
cDialog::cDialog(std::string path, cDialog* p) : parent(p) {
loadFromFile(path);
}

View File

@@ -48,8 +48,7 @@ public:
static const short BG_LIGHT, BG_DARK;
static short defaultBackground;
explicit cDialog(cDialog* p = NULL); // dialog with no items
explicit cDialog(std::string path); // cd_create_dialog
cDialog(std::string path,cDialog* p); // cd_create_dialog_parent_num
explicit cDialog(std::string path, cDialog* p = NULL); // cd_create_dialog
~cDialog(); // cd_kill_dialog
bool add(cControl* what, RECT ctrl_frame, std::string key); // returns false if the key is used, true if the control was added
bool remove(std::string key); // returns true if the key existed and was removed, false if the key did not exist