bool COptions::SetOption(unsigned int nID, int value) { if (nID >= OPTIONS_NUM) return false; if (options[nID].type != number) return false; ContinueSetOption(nID, value); return true; }
bool COptions::SetOption(unsigned int nID, std::wstring const& value) { if (nID >= OPTIONS_NUM) { return false; } if (options[nID].type != string) { return SetOption(nID, fz::to_integral<int>(value)); } ContinueSetOption(nID, value); return true; }
bool COptions::SetOption(unsigned int nID, wxString const& value) { if (nID >= OPTIONS_NUM) return false; if (options[nID].type != string) { long tmp; if (!value.ToLong(&tmp)) return false; return SetOption(nID, tmp); } ContinueSetOption(nID, value); return true; }