Ver Fonte

revert changes

blueloveTH há 2 anos atrás
pai
commit
7a53ae47ee
2 ficheiros alterados com 3 adições e 2 exclusões
  1. 1 1
      include/pocketpy/vector.h
  2. 2 1
      src/error.cpp

+ 1 - 1
include/pocketpy/vector.h

@@ -128,7 +128,7 @@ struct pod_vector{
     }
     }
 
 
     ~pod_vector() {
     ~pod_vector() {
-        if(_data!=nullptr) pool64_dealloc(_data);
+        if(_data != nullptr) pool64_dealloc(_data);
     }
     }
 };
 };
 
 

+ 2 - 1
src/error.cpp

@@ -7,7 +7,8 @@ namespace pkpy{
         // Skip utf8 BOM if there is any.
         // Skip utf8 BOM if there is any.
         if (strncmp(source.data(), "\xEF\xBB\xBF", 3) == 0) index += 3;
         if (strncmp(source.data(), "\xEF\xBB\xBF", 3) == 0) index += 3;
         // Drop all '\r'
         // Drop all '\r'
-        SStream ss(source.size());
+        // SStream ss(source.size());
+        SStream ss;
         while(index < source.size()){
         while(index < source.size()){
             if(source[index] != '\r') ss << source[index];
             if(source[index] != '\r') ss << source[index];
             index++;
             index++;