mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30:07 +01:00
Merge pull request #9 from davidfraser/double-float-clicks
Don't replace `double` with `float` if it's immediately followed by 'click'
This commit is contained in:
@@ -198,9 +198,10 @@ def ReplaceCppItems(line):
|
||||
:rtype: `string`
|
||||
"""
|
||||
|
||||
items = RE_KEEP_SPACES.split(line)
|
||||
newstr = []
|
||||
|
||||
for item in RE_KEEP_SPACES.split(line):
|
||||
for n, item in enumerate(items):
|
||||
|
||||
if item in CPP_ITEMS:
|
||||
continue
|
||||
@@ -210,7 +211,8 @@ def ReplaceCppItems(line):
|
||||
elif item == 'char':
|
||||
item = 'int'
|
||||
elif item == 'double':
|
||||
item = 'float'
|
||||
if len(items) > n+2 and not items[n+2].lower().startswith("click"):
|
||||
item = 'float'
|
||||
|
||||
if len(item.replace('``', '')) > 2:
|
||||
if '*' in item:
|
||||
|
||||
Reference in New Issue
Block a user