From 817dd7ccbb166b27c93706dffc5c0c0d59fd87f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 30 Oct 2016 19:05:14 +0100 Subject: style: Fix PEP8 blank lines issues in Python files Done with `autopep8 --select=E3,W3`, fixes: - E301 - Add missing blank line. - E302 - Add missing 2 blank lines. - E303 - Remove extra blank lines. - E304 - Remove blank line following function decorator. - E309 - Add missing blank line. - W391 - Remove trailing blank lines. --- modules/regex/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/regex') diff --git a/modules/regex/config.py b/modules/regex/config.py index 667b5d8ba6..5347cfd243 100644 --- a/modules/regex/config.py +++ b/modules/regex/config.py @@ -1,8 +1,9 @@ #!/usr/bin/env python + def can_build(platform): return True + def configure(env): pass - -- cgit v1.2.3 From f935d7ab0ecd4757690cc29e449fec9572bbb435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Tue, 1 Nov 2016 19:16:46 +0100 Subject: Make regex compilable with RTTI disabled --- modules/regex/regex.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'modules/regex') diff --git a/modules/regex/regex.cpp b/modules/regex/regex.cpp index a0f4b4934c..0197da46fb 100644 --- a/modules/regex/regex.cpp +++ b/modules/regex/regex.cpp @@ -97,6 +97,9 @@ struct RegExNode { memdelete(next); } + // For avoiding RTTI + virtual bool is_look_behind() { return false; } + virtual int test(RegExSearch& s, int pos) const { return next ? next->test(s, pos) : -1; @@ -750,6 +753,8 @@ struct RegExNodeLookBehind : public RegExNodeGroup { reset_pos = true; } + virtual bool is_look_behind() { return true; } + virtual int test(RegExSearch& s, int pos) const { if (pos < length) @@ -1089,7 +1094,7 @@ Error RegEx::compile(const String& p_pattern) { REGEX_COMPILE_FAIL("backreference not found"); for (int i = 0; i < stack.size(); ++i) - if (dynamic_cast(stack[i])) + if (stack[i]->is_look_behind()) REGEX_COMPILE_FAIL("backreferences inside lookbehind not supported"); for (int i = 0; i < group_names.size(); ++i) { @@ -1112,7 +1117,7 @@ Error RegEx::compile(const String& p_pattern) { c = d; for (int i = 0; i < stack.size(); ++i) - if (dynamic_cast(stack[i])) + if (stack[i]->is_look_behind()) REGEX_COMPILE_FAIL("backreferences inside lookbehind not supported"); int ref = -1; @@ -1238,7 +1243,7 @@ Error RegEx::compile(const String& p_pattern) { break; case '|': for (int i = 0; i < stack.size(); ++i) - if (dynamic_cast(stack[i])) + if (stack[i]->is_look_behind()) REGEX_COMPILE_FAIL("alternations inside lookbehind not supported"); stack[0]->add_childset(); break; @@ -1312,7 +1317,7 @@ Error RegEx::compile(const String& p_pattern) { if (min_val != max_val) for (int i = 0; i < stack.size(); ++i) - if (dynamic_cast(stack[i])) + if (stack[i]->is_look_behind()) REGEX_COMPILE_FAIL("variable length quantifiers inside lookbehind not supported"); RegExNodeQuantifier* quant = memnew(RegExNodeQuantifier(min_val, max_val)); -- cgit v1.2.3 From c7bc44d5ad9aae4902280012f7654e2318cd910e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 1 Jan 2017 22:01:57 +0100 Subject: Welcome in 2017, dear changelog reader! That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games! --- modules/regex/regex.cpp | 2 +- modules/regex/regex.h | 2 +- modules/regex/register_types.cpp | 2 +- modules/regex/register_types.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/regex') diff --git a/modules/regex/regex.cpp b/modules/regex/regex.cpp index 0197da46fb..c7ce2884a1 100644 --- a/modules/regex/regex.cpp +++ b/modules/regex/regex.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/modules/regex/regex.h b/modules/regex/regex.h index 803aa72b3f..08b0bebdcd 100644 --- a/modules/regex/regex.h +++ b/modules/regex/regex.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/modules/regex/register_types.cpp b/modules/regex/register_types.cpp index 050cf3efff..b3f56cd924 100644 --- a/modules/regex/register_types.cpp +++ b/modules/regex/register_types.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/modules/regex/register_types.h b/modules/regex/register_types.h index df3b508e14..5d676b6daa 100644 --- a/modules/regex/register_types.h +++ b/modules/regex/register_types.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ -- cgit v1.2.3