mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 19:10:09 +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`
|
:rtype: `string`
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
items = RE_KEEP_SPACES.split(line)
|
||||||
newstr = []
|
newstr = []
|
||||||
|
|
||||||
for item in RE_KEEP_SPACES.split(line):
|
for n, item in enumerate(items):
|
||||||
|
|
||||||
if item in CPP_ITEMS:
|
if item in CPP_ITEMS:
|
||||||
continue
|
continue
|
||||||
@@ -210,7 +211,8 @@ def ReplaceCppItems(line):
|
|||||||
elif item == 'char':
|
elif item == 'char':
|
||||||
item = 'int'
|
item = 'int'
|
||||||
elif item == 'double':
|
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 len(item.replace('``', '')) > 2:
|
||||||
if '*' in item:
|
if '*' in item:
|
||||||
|
|||||||
Reference in New Issue
Block a user