diff options
| author | Charles Giessen <charles@lunarg.com> | 2020-03-27 12:03:01 -0600 |
|---|---|---|
| committer | Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> | 2020-04-03 11:59:29 -0600 |
| commit | 698d82e38b39e94bf4d6013bcb2347813a69d78b (patch) | |
| tree | 414ee81a5ac055b68a278865458c70c6c2cc8ec3 | |
| parent | 7844b9b4e180612c7ca35bcb07ce7f86610b22c4 (diff) | |
| download | usermoji-698d82e38b39e94bf4d6013bcb2347813a69d78b.tar.xz | |
vulkaninfo: fix msvc warnings from wrapper classes
Change-Id: Ie4ec90d05ba5c394df5d020eecee1c061e1010ac
| -rw-r--r-- | vulkaninfo/outputprinter.h | 9 |
1 files 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<int32_t>(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<int32_t>(element_count)); + } ~ArrayWrapper() { p.ArrayEnd(); } private: |
