From 670a48fd862bdabfb53d8ddd52913127199a415d Mon Sep 17 00:00:00 2001 From: George ElKoura Date: Sun, 24 May 2015 01:21:48 -0700 Subject: [PATCH] Fix build breakage on MSVC due to implicit downcasting. Be explicit about the casting from size_t to int in stencilBuilder.cpp. --- opensubdiv/far/stencilBuilder.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opensubdiv/far/stencilBuilder.cpp b/opensubdiv/far/stencilBuilder.cpp index 351d5680..603d2d14 100644 --- a/opensubdiv/far/stencilBuilder.cpp +++ b/opensubdiv/far/stencilBuilder.cpp @@ -100,8 +100,8 @@ public: _weights[i] = 1.0; } - _size = _sources.size(); - _lastOffset = _sources.size() - 1; + _size = (int)_sources.size(); + _lastOffset = (int)_sources.size() - 1; } template @@ -260,11 +260,11 @@ private: _sizes.resize(dst+1); } // Initialize the new stencil's meta-data (offset, size). - _indices[dst] = _sources.size(); + _indices[dst] = (int)_sources.size(); _sizes[dst] = 0; // Keep track of where the current stencil begins, which lets us // avoid having to look it up later. - _lastOffset = _sources.size(); + _lastOffset = (int)_sources.size(); } // Cache the number of elements as an optimization, it's faster than // calling size() on any of the vectors.