mirror of
				https://bitbucket.org/s_l_teichmann/mtsatellite
				synced 2025-10-31 08:05:27 +01:00 
			
		
		
		
	Removed another usage of fmt.Sprintf.
This commit is contained in:
		| @@ -5,7 +5,6 @@ | ||||
| package main | ||||
|  | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"image" | ||||
| 	"image/draw" | ||||
| 	"io/ioutil" | ||||
| @@ -89,7 +88,7 @@ func createParentLevel(oldDir string, jobs chan pyramidJob) (newDir string, err | ||||
|  | ||||
| 	newLevel := oldLevel - 1 | ||||
|  | ||||
| 	log.Printf("Generating tiles of level %d", newLevel) | ||||
| 	log.Printf("Generating tiles of level %d\n", newLevel) | ||||
|  | ||||
| 	parentDir := filepath.Dir(oldDir) | ||||
| 	newDir = filepath.Join(parentDir, strconv.Itoa(newLevel)) | ||||
| @@ -118,13 +117,13 @@ func createParentLevel(oldDir string, jobs chan pyramidJob) (newDir string, err | ||||
| 		} | ||||
|  | ||||
| 		for oz, nz := zMin, zMin; oz <= zMax; oz += 2 { | ||||
| 			oz1 := fmt.Sprintf("%d.png", oz) | ||||
| 			oz2 := fmt.Sprintf("%d.png", oz+1) | ||||
| 			oz1 := strconv.Itoa(oz) + ".png" | ||||
| 			oz2 := strconv.Itoa(oz+1) + ".png" | ||||
| 			s1 := filepath.Join(ox1Dir, oz1) | ||||
| 			s2 := filepath.Join(ox1Dir, oz2) | ||||
| 			s3 := filepath.Join(ox2Dir, oz1) | ||||
| 			s4 := filepath.Join(ox2Dir, oz2) | ||||
| 			d := filepath.Join(nxDir, fmt.Sprintf("%d.png", nz)) | ||||
| 			d := filepath.Join(nxDir, strconv.Itoa(nz)+".png") | ||||
| 			jobs <- pyramidJob{src: [4]string{s1, s2, s3, s4}, dst: d} | ||||
| 			nz++ | ||||
| 		} | ||||
| @@ -179,7 +178,7 @@ func fuseTiles(jobs chan pyramidJob, done *sync.WaitGroup) { | ||||
|  | ||||
| 	for job := range jobs { | ||||
| 		if err := fuseTile(scratch, &job); err != nil { | ||||
| 			log.Printf("WARN: Writing image failed: %s", err) | ||||
| 			log.Printf("WARN: Writing image failed: %s\n", err) | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user