Преглед изворни кода

Fixed ++ and -- appearing in translated c++ code.

Mark Sibly пре 8 година
родитељ
комит
7509d289ee
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      src/mx2cc/translator_cpp.monkey2

+ 5 - 1
src/mx2cc/translator_cpp.monkey2

@@ -1871,7 +1871,11 @@ Class Translator_CPP Extends Translator
 
 		If etype t="int("+t+")"
 		
-		t=op+t
+		If (op="+" Or op="-") And t.StartsWith( op )	'deal with -- and ++
+			t=op+"("+t+")"
+		Else
+			t=op+t
+		Endif
 		
 		If etype t=EnumName( etype )+"("+t+")"