Commit graph

1293 commits

Author SHA1 Message Date
Hein-Pieter van Braam
cacced7e50 Convert Object::cast_to() to the static version
Currently we rely on some undefined behavior when Object->cast_to() gets
called with a Null pointer. This used to work fine with GCC < 6 but
newer versions of GCC remove all codepaths in which the this pointer is
Null. However, the non-static cast_to() was supposed to be null safe.

This patch makes cast_to() Null safe and removes the now redundant Null
checks where they existed.

It is explained in this article: https://www.viva64.com/en/b/0226/
2017-08-24 23:08:24 +02:00
Hein-Pieter van Braam
4aa2c18cb4 Add a static version of Object::cast_to()
This is to prepare to replace all instances of the member version of
cast_to().
2017-08-24 23:08:24 +02:00
volzhs
62bb600b5c Show proper string with InputEvent.as_text() 2017-08-25 01:14:36 +09:00
Juan Linietsky
05a6785344 GCC fixes 2017-08-24 00:50:16 -03:00
Juan Linietsky
36e0a72c77 -Code completion for enumerations
-Disabled GDNative and GDNativeScript so build compiles again
2017-08-24 00:06:56 -03:00
Juan Linietsky
3d1c031871 Changed MethodBind API to request information from methods. It's much claner now.
Also changed PropertyInfo to include informatino about class names.
2017-08-23 19:11:11 -03:00
Wilson E. Alvarez
298a6934b6 Moved member variables to initializer list 2017-08-22 11:47:50 -04:00
Juan Linietsky
8a4e05a440 Merge pull request #10520 from RandomShaper/fix-double-parsing
Fix tokenization of doubles
2017-08-22 10:02:42 -03:00
Rémi Verschelde
7f49e2a7a0 Merge pull request #10487 from marcelofg55/curscr_as_default
p_screen param from get_screen_* funcs now default to the current screen
2017-08-22 08:12:04 +02:00
Rémi Verschelde
df590fc2d3 Merge pull request #10340 from Rubonnek/remove-unnecessary-assignments
Removed unnecessary assignments
2017-08-22 00:58:12 +02:00
Rémi Verschelde
13f879587d Merge pull request #10254 from marcelofg55/master
Added notification const NOTIFICATION_WM_ABOUT
2017-08-22 00:56:31 +02:00
Juan Linietsky
2cc8309249 Merge pull request #10351 from neikeq/enums-are-for-the-weak
ClassDB: Provide the enum name of integer constants
2017-08-21 19:56:08 -03:00
Rémi Verschelde
92410df24c Merge pull request #10415 from tagcup/euler_hack
Fix incorrect workaround for pure Y (X) rotations in XYZ (YXZ) conven…
2017-08-22 00:54:39 +02:00
Rémi Verschelde
135027a2f6 Merge pull request #10225 from Noshyaar/map
GDScript Built-in: add inverse_lerp & range_lerp
2017-08-22 00:31:46 +02:00
Pedro J. Estébanez
6759a28050 Fix tokenization of doubles
Fixes #9600.
2017-08-21 23:59:29 +02:00
Rémi Verschelde
e9c43cecbf Merge pull request #10433 from djrm/pr_svg_support
SVG support
2017-08-21 23:49:07 +02:00
Marcelo Fernandez
63f847b306 p_screen param from get_screen_* funcs now default to the current screen 2017-08-21 18:28:29 -03:00
Rémi Verschelde
de261ef380 Merge pull request #10484 from Sipaha/pr_mt_queue_deadlock_fix
Fix deadlock in CommandQueueMT
2017-08-21 22:55:07 +02:00
Wilson E. Alvarez
738d2ab969 Removed unnecessary assignments 2017-08-21 15:15:55 -04:00
Rémi Verschelde
4717d37bfa Merge pull request #10471 from akien-mga/args-doubledash
Third take at making command-line arguments more UNIX-like + main.cpp and help cleanup
2017-08-21 21:01:19 +02:00
Juan Linietsky
1be30f35a6 Fix binary object marshalling, closes #9472 2017-08-21 11:22:08 -03:00
Rémi Verschelde
93f1fb1c2f Fixes for new two-dash long command line arguments
- Fixes some single-dash leftovers that were missed in the previous commit
- Reorder the help output for clarity, and document missing options
- Drop obsolete options: --noop, --pack, --editor-scene, --level, --import, --import-script, --no-quit
- Improve error message on malformed arguments and do not display help on error
- Always use long form of arguments when starting a new Godot process from C++, for clarity and easy grepping
- Cleanup obsolete code here and there
2017-08-21 08:09:22 +02:00
Juan Linietsky
533014b88c simplify the way window is allowed to steal focus, no longer relying on project.godot. Closes #9459 2017-08-20 23:42:54 -03:00
Ignacio Etcheverry
32dd9a9f66 ClassDB: Provide the enum name of integer constants 2017-08-20 22:07:43 +02:00
Daniel J. Ramirez
da8fecf25e Added support for SVG 2017-08-20 13:53:02 -05:00
Sipaha
f6ee4cac39 Move wait_for_flush out of queue lock 2017-08-21 01:10:44 +07:00
Juan Linietsky
541fdffc0a Merge pull request #10319 from neikeq/pr-engine-editor-hint
Adds Engine::is_editor_hint() method
2017-08-20 12:55:46 -03:00
Rémi Verschelde
f6c39830cb Merge pull request #10481 from neikeq/water-store-remark
Fixes Ref's GetTypeInfo missing with ptrcall disabled
2017-08-20 16:34:38 +02:00
Ignacio Etcheverry
af4c4397df Fixes Ref's GetTypeInfo missing with ptrcall disabled 2017-08-20 14:28:22 +02:00
Przemysław Gołąb (n-pigeon)
6d56c73de7 Exposed Transform.interpolate_with()
Additionaly changed values names for 2D version to more descriptive ones.
2017-08-20 00:09:45 +02:00
Juan Linietsky
b9dcebb37c Revert "Second take at making command-line arguments more UNIX-like + main.cpp and help cleanup" 2017-08-19 17:47:27 -03:00
Rémi Verschelde
70b0857f6c Fixes for new two-dash long command line arguments
- Fixes some single-dash leftovers that were missed in the previous commit
- Reorder the help output for clarity, and document missing options
- Drop obsolete options: --noop, --pack, --editor-scene, --level, --import, --import-script, --no-quit
- Improve error message on malformed arguments and do not display help on error
- Cleanup obsolete code here and there
2017-08-19 16:48:11 +02:00
Ignacio Etcheverry
fd69604bd9 Adds editor_hint to Engine class 2017-08-19 01:03:12 +02:00
Rémi Verschelde
18a7315381 Rename localization method to tr again
Partial revert of #10380 based on contributor ~~bullying~~ feedback.
2017-08-18 22:38:38 +02:00
Juan Linietsky
72be8876ea Properly manage drawing of primitives when they lack an area, fixes #8930 2017-08-18 15:12:48 -03:00
Poommetee Ketson
d28da86f9f GDScript Built-in: add inverse_lerp & range_lerp 2017-08-18 21:49:03 +07:00
Juan Linietsky
dc62389739 -Properly check limits to objects sent (regarding to size), fixes #9034
-Changed the way objects are marshalled and sent to the debugger
-Editing debugged objects happens in the remote inspector now
2017-08-18 10:59:31 -03:00
Rémi Verschelde
1a92906b68 Merge pull request #10406 from marcelofg55/closest_power_of_2
Add closest_power_of_2 func and implement mix_rate/latency on OS X
2017-08-18 08:12:56 +02:00
Ferenc Arn
94aa4092f5 Fix incorrect workaround for pure Y (X) rotations in XYZ (YXZ) convention.
Fixes #10352.
2017-08-18 01:45:36 -04:00
Marcelo Fernandez
eab850524e Add closest_power_of_2 func and implement mix_rate/latency on OS X 2017-08-17 19:51:13 -03:00
Rémi Verschelde
ee59e627de Merge pull request #10380 from akien-mga/XL_MESSAGE
Rename `XL_MESSAGE`/`tr` to `localize`
2017-08-17 22:41:55 +02:00
Rémi Verschelde
c72529baf0 Rename XL_MESSAGE aka tr to localize
Also renames `set_message_translation` to `set_message_localization`
for consistency.
2017-08-17 18:10:22 +02:00
Marcelo Fernandez
aae29c7a0e Added notification const NOTIFICATION_WM_ABOUT 2017-08-17 11:28:45 -03:00
Rémi Verschelde
a8a6082dc0 Merge pull request #8899 from toger5/BetterFlatStylebox
Better flat stylebox with rounded corners
2017-08-16 18:15:04 +02:00
TwistedTwigleg
00f6c85928 Synchronize parameter names in definition and declaration
Fixes #10244.
2017-08-16 17:22:23 +02:00
Rémi Verschelde
035d74f54a Rename cull_AABB to cull_aabb
Part of #8830.
2017-08-16 17:01:05 +02:00
Rémi Verschelde
a8207b2dc7 Merge pull request #10264 from Rubonnek/use-const-reference
Use const reference where favorable
2017-08-16 16:41:35 +02:00
kubecz3k
edd6dce622 Merge pull request #10334 from Faless/fix_spbuffer_utf8
Fix StreamPeer put_utf8_string not working
2017-08-15 23:06:40 +02:00
toger5
c39ac8650d Added Corner Enum 2017-08-15 19:36:34 +02:00
Andreas Haas
155402dc1b
Removing a Resource also deletes imported files. 2017-08-15 01:13:41 +02:00