mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
settings get read&written
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@11 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -111,6 +111,11 @@ template <> void Reader::handle(int& i) {
|
||||
value.ToLong(&l);
|
||||
i = l;
|
||||
}
|
||||
template <> void Reader::handle(unsigned int& i) {
|
||||
long l = 0;
|
||||
value.ToLong(&l);
|
||||
i = abs(l); // abs, because it will seem strange if -1 comes out as MAX_INT
|
||||
}
|
||||
template <> void Reader::handle(double& d) {
|
||||
value.ToDouble(&d);
|
||||
}
|
||||
|
||||
@@ -92,6 +92,9 @@ void Writer::handle(const String& value) {
|
||||
template <> void Writer::handle(const int& value) {
|
||||
handle(String() << value);
|
||||
}
|
||||
template <> void Writer::handle(const unsigned int& value) {
|
||||
handle(String() << value);
|
||||
}
|
||||
template <> void Writer::handle(const double& value) {
|
||||
handle(String() << value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user