aboutsummaryrefslogtreecommitdiff
path: root/src/gui/guiFormSpecMenu.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2021-09-11 21:06:57 +0200
committerGitHub <noreply@github.com>2021-09-11 21:06:57 +0200
commit75bf9b75caba5fc876f20eabea3fabc142d1b51e (patch)
treec5a584838498760d0cb5e206795ead223d15527b /src/gui/guiFormSpecMenu.cpp
parent766e885a1b1c5afb7a62f11b427b6d135adeab87 (diff)
downloadminetest-75bf9b75caba5fc876f20eabea3fabc142d1b51e.tar.gz
minetest-75bf9b75caba5fc876f20eabea3fabc142d1b51e.tar.bz2
minetest-75bf9b75caba5fc876f20eabea3fabc142d1b51e.zip
Make sure relevant std::stringstreams are set to binary
Diffstat (limited to 'src/gui/guiFormSpecMenu.cpp')
-rw-r--r--src/gui/guiFormSpecMenu.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gui/guiFormSpecMenu.cpp b/src/gui/guiFormSpecMenu.cpp
index 09b004f8f..797fd3ff6 100644
--- a/src/gui/guiFormSpecMenu.cpp
+++ b/src/gui/guiFormSpecMenu.cpp
@@ -3933,9 +3933,7 @@ void GUIFormSpecMenu::acceptInput(FormspecQuitMode quitmode)
}
if (e != 0) {
- std::stringstream ss;
- ss << (e->getActiveTab() +1);
- fields[name] = ss.str();
+ fields[name] = itos(e->getActiveTab() + 1);
}
} else if (s.ftype == f_CheckBox) {
// No dynamic cast possible due to some distributions shipped
@@ -3961,12 +3959,10 @@ void GUIFormSpecMenu::acceptInput(FormspecQuitMode quitmode)
e = static_cast<GUIScrollBar *>(element);
if (e) {
- std::stringstream os;
- os << e->getPos();
if (s.fdefault == L"Changed")
- fields[name] = "CHG:" + os.str();
+ fields[name] = "CHG:" + itos(e->getPos());
else
- fields[name] = "VAL:" + os.str();
+ fields[name] = "VAL:" + itos(e->getPos());
}
} else if (s.ftype == f_AnimatedImage) {
// No dynamic cast possible due to some distributions shipped