Переглянути джерело

Fix misplaced line number (was wrongly formatted and before procedure)

Mikkel Hjortshoej 5 роки тому
батько
коміт
730f9ee0b3
1 змінених файлів з 6 додано та 6 видалено
  1. 6 6
      core/log/file_console_logger.odin

+ 6 - 6
core/log/file_console_logger.odin

@@ -127,12 +127,6 @@ do_location_header :: proc(opts: Options, buf: ^strings.Builder, location := #ca
 	if Location_File_Opts & opts != nil {
 		fmt.sbprint(buf, file);
 	}
-	if .Line in opts {
-		if (Location_File_Opts | {.Procedure}) & opts != nil {
-			fmt.sbprint(buf, ":");
-		}
-		fmt.sbprint(buf, location.line);
-	}
 
 	if .Procedure in opts {
 		if Location_File_Opts & opts != nil {
@@ -141,6 +135,12 @@ do_location_header :: proc(opts: Options, buf: ^strings.Builder, location := #ca
 		fmt.sbprintf(buf, "%s()", location.procedure);
 	}
 
+	if .Line in opts {
+		if (Location_File_Opts | {.Procedure}) & opts != nil {
+			fmt.sbprint(buf, ":");
+		}
+		fmt.sbprint(buf, location.line);
+	}
 
 	fmt.sbprint(buf, "] ");
 }