summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/events/keyevent.h2
-rw-r--r--src/gui/widgets/inttextfield.cpp2
-rw-r--r--src/gui/widgets/textfield.cpp2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/events/keyevent.h b/src/events/keyevent.h
index f27851f0e..728cd79ea 100644
--- a/src/events/keyevent.h
+++ b/src/events/keyevent.h
@@ -67,6 +67,8 @@
#include "events/inputguievent.h"
#include "input/key.h"
+#include <string>
+
namespace gcn
{
class Widget;
diff --git a/src/gui/widgets/inttextfield.cpp b/src/gui/widgets/inttextfield.cpp
index 6d8eed228..160cfe5de 100644
--- a/src/gui/widgets/inttextfield.cpp
+++ b/src/gui/widgets/inttextfield.cpp
@@ -71,7 +71,7 @@ void IntTextField::keyPressed(KeyEvent &event)
if (val != Key::TEXTINPUT)
return;
- const std::string str = event->getText();
+ const std::string str = event.getText();
if (str.empty())
return;
const size_t sz = str.size();
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index eb1484449..226d9172c 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -201,7 +201,7 @@ void TextField::keyPressed(KeyEvent &keyEvent)
#ifdef USE_SDL2
if (val == Key::TEXTINPUT)
{
- std::string str = keyEvent->getText();
+ std::string str = keyEvent.getText();
mText.insert(mCaretPosition, str);
mCaretPosition += str.size();
keyEvent.consume();