X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/16c1f7f345e1850f590cfbf67c3b00fbb6d2e62e..520e470fdd0daef09c77938db642e4583933c90d:/src/common/config.cpp diff --git a/src/common/config.cpp b/src/common/config.cpp index 9707475ac9..5aac22351b 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -179,6 +179,24 @@ bool wxConfigBase::Read(const wxString& key, bool* val, bool defVal) const } // Convenience functions + +bool wxConfigBase::Read(const wxString& key, int *pi) const +{ + long l; + bool ret = Read(key, &l); + if (ret) + *pi = (int) l; + return ret; +} + +bool wxConfigBase::Read(const wxString& key, int *pi, int defVal) const +{ + long l; + bool ret = Read(key, &l, (long) defVal); + *pi = (int) l; + return ret; +} + bool wxConfigBase::Write(const wxString& key, double val) { wxString str;