瀏覽代碼

Keep `-vet` happy

gingerBill 2 年之前
父節點
當前提交
abca3ceac8
共有 3 個文件被更改,包括 3 次插入5 次删除
  1. 0 2
      examples/all/all_experimental.odin
  2. 1 1
      vendor/fontstash/fontstash.odin
  3. 2 2
      vendor/nanovg/nanovg.odin

+ 0 - 2
examples/all/all_experimental.odin

@@ -3,8 +3,6 @@ package all
 
 import c_tokenizer    "core:c/frontend/tokenizer"
 import c_preprocessor "core:c/frontend/preprocessor"
-import virtual "core:mem/virtual"
 
 _ :: c_tokenizer
 _ :: c_preprocessor
-_ :: virtual

+ 1 - 1
vendor/fontstash/fontstash.odin

@@ -1067,7 +1067,7 @@ TextIterNext :: proc(
 			iter.x = iter.nextx
 			iter.y = iter.nexty
 			iter.codepointCount += 1
-			if glyph, ok := __getGlyph(ctx, iter.font, iter.codepoint, iter.isize, iter.iblur); ok {
+			if glyph, glyph_ok := __getGlyph(ctx, iter.font, iter.codepoint, iter.isize, iter.iblur); glyph_ok {
 				__getQuad(ctx, iter.font, iter.previousGlyphIndex, glyph, iter.scale, iter.spacing, &iter.nextx, &iter.nexty, quad)
 				iter.previousGlyphIndex = glyph.index
 			} else {

+ 2 - 2
vendor/nanovg/nanovg.odin

@@ -916,8 +916,8 @@ CreateImageMem :: proc(ctx: ^Context, data: []byte, imageFlags: ImageFlags) -> i
 		return 0
 	}
 
-	data  := img[:int(w) * int(h) * int(n)]
-	image := CreateImageRGBA(ctx, int(w), int(h), imageFlags, data)
+	pixel_data := img[:int(w) * int(h) * int(n)]
+	image := CreateImageRGBA(ctx, int(w), int(h), imageFlags, pixel_data)
 	stbi.image_free(img)
 	return image
 }