From 698d82e38b39e94bf4d6013bcb2347813a69d78b Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Fri, 27 Mar 2020 12:03:01 -0600 Subject: vulkaninfo: fix msvc warnings from wrapper classes Change-Id: Ie4ec90d05ba5c394df5d020eecee1c061e1010ac --- vulkaninfo/outputprinter.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vulkaninfo/outputprinter.h b/vulkaninfo/outputprinter.h index 3fce9b98..6cce4e2c 100644 --- a/vulkaninfo/outputprinter.h +++ b/vulkaninfo/outputprinter.h @@ -710,8 +710,9 @@ class IndentWrapper { class ObjectWrapper { public: - ObjectWrapper(Printer &p, std::string object_name, int32_t count_subobjects = -1) : p(p) { - p.ObjectStart(object_name, count_subobjects); + ObjectWrapper(Printer &p, std::string object_name) : p(p) { p.ObjectStart(object_name); } + ObjectWrapper(Printer &p, std::string object_name, size_t count_subobjects) : p(p) { + p.ObjectStart(object_name, static_cast(count_subobjects)); } ~ObjectWrapper() { p.ObjectEnd(); } @@ -721,7 +722,9 @@ class ObjectWrapper { class ArrayWrapper { public: - ArrayWrapper(Printer &p, std::string array_name, int32_t element_count = 0) : p(p) { p.ArrayStart(array_name, element_count); } + ArrayWrapper(Printer &p, std::string array_name, size_t element_count = 0) : p(p) { + p.ArrayStart(array_name, static_cast(element_count)); + } ~ArrayWrapper() { p.ArrayEnd(); } private: -- cgit v1.2.3