Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 7094159

Browse files
johnstiles-googleSkia Commit-Bot
authored andcommitted
Remove unnecessary SK_SIZE_T_SPECIFIER macro.
This macro was only necessary to support Visual Studio 2013, which did not yet support %zu format specifiers. Skia no longer compiles on Visual Studio 2013. Change-Id: Ie32a66c7a8e022b8596272476ca3547df1f89a55 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287738 Auto-Submit: John Stiles <[email protected]> Commit-Queue: Mike Klein <[email protected]> Reviewed-by: Mike Klein <[email protected]>
1 parent 1bedbeb commit 7094159

File tree

4 files changed

+3
-12
lines changed

4 files changed

+3
-12
lines changed

include/core/SkTypes.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -404,14 +404,6 @@
404404
# endif
405405
#endif
406406

407-
#ifndef SK_SIZE_T_SPECIFIER
408-
# if defined(_MSC_VER) && !defined(__clang__)
409-
# define SK_SIZE_T_SPECIFIER "%Iu"
410-
# else
411-
# define SK_SIZE_T_SPECIFIER "%zu"
412-
# endif
413-
#endif
414-
415407
#ifndef SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
416408
#define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0
417409
#endif

samplecode/SampleSlides.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ class SlideView : public Sample {
428428
gProc[i](&canvas);
429429
canvas.restore();
430430
SkString str;
431-
str.printf("/skimages/slide_" SK_SIZE_T_SPECIFIER ".png", i);
431+
str.printf("/skimages/slide_%zu.png", i);
432432
ToolUtils::EncodeImageToFile(str.c_str(), bm, SkEncodedImageFormat::kPNG, 100);
433433
}
434434
this->setBGColor(BG_COLOR);

src/ports/SkMemory_malloc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
SkASSERT((SkDebugf(fmt"\n", __VA_ARGS__), false))
1414

1515
static inline void sk_out_of_memory(size_t size) {
16-
SK_DEBUGFAILF("sk_out_of_memory (asked for " SK_SIZE_T_SPECIFIER " bytes)",
16+
SK_DEBUGFAILF("sk_out_of_memory (asked for %zu bytes)",
1717
size);
1818
#if defined(IS_FUZZING_WITH_AFL)
1919
exit(1);

tests/CachedDecodingPixelRefTest.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ DEF_TEST(Image_NewFromGenerator, r) {
102102
auto gen = std::make_unique<TestImageGenerator>(test, r, testColorType);
103103
sk_sp<SkImage> image(SkImage::MakeFromGenerator(std::move(gen)));
104104
if (nullptr == image) {
105-
ERRORF(r, "SkImage::NewFromGenerator unexpecedly failed ["
106-
SK_SIZE_T_SPECIFIER "]", i);
105+
ERRORF(r, "SkImage::NewFromGenerator unexpecedly failed [%zu]", i);
107106
continue;
108107
}
109108
REPORTER_ASSERT(r, TestImageGenerator::Width() == image->width());

0 commit comments

Comments
 (0)