{\r
if (this->bWriteHistory)\r
{\r
- size_t nMax = this->ReadId(CONF_HISTORY_COUNT, 7l);\r
- for (size_t i = 0; i < nMax && i < this->GetHistoryCount(CONF_HISTORY_PATH); i++)\r
- {\r
- this->myWriteHistory(CONF_HISTORY_PATH, i);\r
- }\r
- for (size_t i = 0; i < nMax && i < this->GetHistoryCount(CONF_HISTORY_NAME); i++)\r
- {\r
- this->myWriteHistory(CONF_HISTORY_NAME, i);\r
- }\r
- for (size_t i = 0; i < nMax && i < this->GetHistoryCount(CONF_HISTORY_FULL); i++)\r
- {\r
- this->myWriteHistory(CONF_HISTORY_FULL, i);\r
- }\r
+ this->myWriteHistoryLoop(CONF_HISTORY_PATH);\r
+ this->myWriteHistoryLoop(CONF_HISTORY_NAME);\r
+ this->myWriteHistoryLoop(CONF_HISTORY_FULL);\r
}\r
}\r
\r
this->Write(wxString::Format(this->label[confId], i), this->asHistory[confId - CONF_HISTORY_PATH][i]);\r
}\r
\r
+void myConfig::myWriteHistoryLoop(myConfigId confId)\r
+{\r
+ for (size_t i = 0; i < (size_t) this->ReadId(CONF_HISTORY_COUNT, 7l) && i < this->GetHistoryCount(confId); i++)\r
+ {\r
+ this->myWriteHistory(confId, i);\r
+ }\r
+}\r
+\r
size_t myConfig::GetHistoryCount(myConfigId confId)\r
{\r
return this->asHistory[confId - CONF_HISTORY_PATH].GetCount();\r
\r
void myReadHistory(myConfigId confId, size_t i);\r
void myWriteHistory(myConfigId confId, size_t i);\r
+ void myConfig::myWriteHistoryLoop(myConfigId confId);\r
};\r
\r
#endif\r