summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/etc/SCsub5
-rw-r--r--platform/android/detect.py2
-rw-r--r--platform/haiku/detect.py4
-rw-r--r--platform/iphone/detect.py2
-rw-r--r--platform/osx/detect.py2
-rw-r--r--platform/server/detect.py4
-rw-r--r--platform/x11/detect.py6
-rw-r--r--scene/gui/line_edit.cpp12
-rw-r--r--scene/gui/text_edit.cpp8
-rw-r--r--scene/main/node.cpp2
10 files changed, 23 insertions, 24 deletions
diff --git a/modules/etc/SCsub b/modules/etc/SCsub
index d2c77d6e3c..6e963ef766 100644
--- a/modules/etc/SCsub
+++ b/modules/etc/SCsub
@@ -33,11 +33,6 @@ env_etc.Append(CPPPATH=[thirdparty_dir])
if not env.msvc:
env_etc.Append(CCFLAGS="-std=c++11")
-# -ffast-math seems to be incompatible with etc2comp on recent versions of
-# GCC and Clang
-if '-ffast-math' in env_etc['CCFLAGS']:
- env_etc['CCFLAGS'].remove('-ffast-math')
-
env_thirdparty = env_etc.Clone()
env_thirdparty.disable_warnings()
env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources)
diff --git a/platform/android/detect.py b/platform/android/detect.py
index 7a728e4ef1..b031e51d8c 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -141,7 +141,7 @@ def configure(env):
if (env["target"].startswith("release")):
if (env["optimize"] == "speed"): #optimize for speed (default)
env.Append(LINKFLAGS=['-O2'])
- env.Append(CPPFLAGS=['-O2', '-DNDEBUG', '-ffast-math', '-funsafe-math-optimizations', '-fomit-frame-pointer'])
+ env.Append(CPPFLAGS=['-O2', '-DNDEBUG', '-fomit-frame-pointer'])
else: #optimize for size
env.Append(CPPFLAGS=['-Os', '-DNDEBUG'])
env.Append(LINKFLAGS=['-Os'])
diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py
index 8d704ac657..ae8cc58a4a 100644
--- a/platform/haiku/detect.py
+++ b/platform/haiku/detect.py
@@ -37,14 +37,14 @@ def configure(env):
## Build type
if (env["target"] == "release"):
- env.Prepend(CCFLAGS=['-O3', '-ffast-math'])
+ env.Prepend(CCFLAGS=['-O3'])
if (env["debug_symbols"] == "yes"):
env.Prepend(CCFLAGS=['-g1'])
if (env["debug_symbols"] == "full"):
env.Prepend(CCFLAGS=['-g2'])
elif (env["target"] == "release_debug"):
- env.Prepend(CCFLAGS=['-O2', '-ffast-math', '-DDEBUG_ENABLED'])
+ env.Prepend(CCFLAGS=['-O2', '-DDEBUG_ENABLED'])
if (env["debug_symbols"] == "yes"):
env.Prepend(CCFLAGS=['-g1'])
if (env["debug_symbols"] == "full"):
diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py
index 20fb4428dd..797a7d31aa 100644
--- a/platform/iphone/detect.py
+++ b/platform/iphone/detect.py
@@ -46,7 +46,7 @@ def configure(env):
if (env["target"].startswith("release")):
env.Append(CPPFLAGS=['-DNDEBUG', '-DNS_BLOCK_ASSERTIONS=1'])
if (env["optimize"] == "speed"): #optimize for speed (default)
- env.Append(CPPFLAGS=['-O2', '-ftree-vectorize', '-fomit-frame-pointer', '-ffast-math', '-funsafe-math-optimizations'])
+ env.Append(CPPFLAGS=['-O2', '-ftree-vectorize', '-fomit-frame-pointer'])
env.Append(LINKFLAGS=['-O2'])
else: #optimize for size
env.Append(CPPFLAGS=['-Os', '-ftree-vectorize'])
diff --git a/platform/osx/detect.py b/platform/osx/detect.py
index 6eee8f204f..31fcbc0427 100644
--- a/platform/osx/detect.py
+++ b/platform/osx/detect.py
@@ -42,7 +42,7 @@ def configure(env):
if (env["target"] == "release"):
if (env["optimize"] == "speed"): #optimize for speed (default)
- env.Prepend(CCFLAGS=['-O3', '-ffast-math', '-fomit-frame-pointer', '-ftree-vectorize', '-msse2'])
+ env.Prepend(CCFLAGS=['-O3', '-fomit-frame-pointer', '-ftree-vectorize', '-msse2'])
else: #optimize for size
env.Prepend(CCFLAGS=['-Os','-ftree-vectorize', '-msse2'])
diff --git a/platform/server/detect.py b/platform/server/detect.py
index 0b23e9c649..392a987ee9 100644
--- a/platform/server/detect.py
+++ b/platform/server/detect.py
@@ -43,10 +43,10 @@ def configure(env):
## Build type
if (env["target"] == "release"):
- env.Append(CCFLAGS=['-O2', '-ffast-math', '-fomit-frame-pointer'])
+ env.Append(CCFLAGS=['-O2', '-fomit-frame-pointer'])
elif (env["target"] == "release_debug"):
- env.Append(CCFLAGS=['-O2', '-ffast-math', '-DDEBUG_ENABLED'])
+ env.Append(CCFLAGS=['-O2', '-DDEBUG_ENABLED'])
elif (env["target"] == "debug"):
env.Append(CCFLAGS=['-g2', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 9b6fb2f478..415e8ceaa6 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -86,10 +86,8 @@ def configure(env):
## Build type
if (env["target"] == "release"):
- # -O3 -ffast-math is identical to -Ofast. We need to split it out so we can selectively disable
- # -ffast-math in code for which it generates wrong results.
if (env["optimize"] == "speed"): #optimize for speed (default)
- env.Prepend(CCFLAGS=['-O3', '-ffast-math'])
+ env.Prepend(CCFLAGS=['-O3'])
else: #optimize for size
env.Prepend(CCFLAGS=['-Os'])
@@ -100,7 +98,7 @@ def configure(env):
elif (env["target"] == "release_debug"):
if (env["optimize"] == "speed"): #optimize for speed (default)
- env.Prepend(CCFLAGS=['-O2', '-ffast-math', '-DDEBUG_ENABLED'])
+ env.Prepend(CCFLAGS=['-O2', '-DDEBUG_ENABLED'])
else: #optimize for size
env.Prepend(CCFLAGS=['-Os', '-DDEBUG_ENABLED'])
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index c48a4e9114..4d638b50c6 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -248,7 +248,9 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) {
set_cursor_position(text.length());
} break;
#endif
- default: { handled = false; }
+ default: {
+ handled = false;
+ }
}
if (handled) {
@@ -860,9 +862,11 @@ void LineEdit::_notification(int p_what) {
} break;
case MainLoop::NOTIFICATION_OS_IME_UPDATE: {
- ime_text = OS::get_singleton()->get_ime_text();
- ime_selection = OS::get_singleton()->get_ime_selection();
- update();
+ if (has_focus()) {
+ ime_text = OS::get_singleton()->get_ime_text();
+ ime_selection = OS::get_singleton()->get_ime_selection();
+ update();
+ }
} break;
}
}
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 6b75ca32b9..19c054fa43 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1449,9 +1449,11 @@ void TextEdit::_notification(int p_what) {
} break;
case MainLoop::NOTIFICATION_OS_IME_UPDATE: {
- ime_text = OS::get_singleton()->get_ime_text();
- ime_selection = OS::get_singleton()->get_ime_selection();
- update();
+ if (has_focus()) {
+ ime_text = OS::get_singleton()->get_ime_text();
+ ime_selection = OS::get_singleton()->get_ime_selection();
+ update();
+ }
} break;
}
}
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 89b740e9a9..ce40088539 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -1070,7 +1070,7 @@ String Node::_generate_serial_child_name(Node *p_child) {
// Assign the base name + separator to name if we have numbers preceded by a separator
if (nums.length() > 0 && name.substr(name_last_index, nnsep.length()) == nnsep) {
- name = name.substr(0, name_last_index + nnsep.length()).strip_edges();
+ name = name.substr(0, name_last_index + nnsep.length());
} else {
nums = "";
}