littlestone0806 hace 2 años
padre
commit
e59b84e2fa
Se han modificado 1 ficheros con 8 adiciones y 1 borrados
  1. 8 1
      sherpa-ncnn/csrc/display.h

+ 8 - 1
sherpa-ncnn/csrc/display.h

@@ -33,7 +33,14 @@ class Display {
   void Print(int32_t segment_id, const std::string &s) {
 #ifdef _MSC_VER
     if (segment_id != -1) {
-      fprintf(stderr, "%d:%s\n", segment_id, s.c_str());
+      if (last_segment_ != segment_id) 
+      {
+          fprintf(stderr, "\n%d:%s", segment_id, s.c_str());
+          last_segment_ = segment_id;
+      }
+      else{
+          fprintf(stderr, "%s", s.c_str());
+      }
     } else {
       fprintf(stderr, "%s\n", s.c_str());
     }