Browse Source

fixed Python3

dmuratshin 10 years ago
parent
commit
a80a84b3d3
3 changed files with 5 additions and 5 deletions
  1. 3 3
      .hg_archival.txt
  2. 1 1
      examples/Demo/src/TestTweenText.h
  3. 1 1
      tools/gen_template.py

+ 3 - 3
.hg_archival.txt

@@ -1,6 +1,6 @@
 repo: b6d71054df5712e643a0685bc3ba54b123db5729
 repo: b6d71054df5712e643a0685bc3ba54b123db5729
-node: 0a8403bb84ad5b1df02d5ac94e9047fa4680c748
+node: 8dec39b5cd7ec6078dfe6ac058c0e57eaf2254b7
 branch: default
 branch: default
 latesttag: oldrender
 latesttag: oldrender
-latesttagdistance: 924
-changessincelatesttag: 1076
+latesttagdistance: 927
+changessincelatesttag: 1081

+ 1 - 1
examples/Demo/src/TestTweenText.h

@@ -17,7 +17,7 @@ public:
     void init(TextField& actor) {}
     void init(TextField& actor) {}
     void update(TextField& actor, float p, const UpdateState& us)
     void update(TextField& actor, float p, const UpdateState& us)
     {
     {
-        int v = lerp<int>(0, _text.size(), p);
+        int v = lerp<int>(0, (int)_text.size(), p);
         wstring res = _text.substr(0, v) + L"<div c = '0x00000000'>" + _text.substr(v, _text.size()) + L"</div>";
         wstring res = _text.substr(0, v) + L"<div c = '0x00000000'>" + _text.substr(v, _text.size()) + L"</div>";
 
 
         //convert back to utf8 string
         //convert back to utf8 string

+ 1 - 1
tools/gen_template.py

@@ -332,7 +332,7 @@ def _run(args):
                 if args.type == "ios" or args.type == "macosx" or ext==".sh":
                 if args.type == "ios" or args.type == "macosx" or ext==".sh":
                     dest_file = io.open(dest_path, "w", newline="\n")
                     dest_file = io.open(dest_path, "w", newline="\n")
                     try:
                     try:
-                        dest_file.write(str(dest_data, encoding='utf-8')) 
+                        dest_file.write(dest_data) 
                     except TypeError:
                     except TypeError:
                         dest_file.write(unicode(dest_data, encoding='utf-8')) 
                         dest_file.write(unicode(dest_data, encoding='utf-8'))