diff --git a/NvTriStrip/NvTriStrip.cpp b/NvTriStrip/NvTriStrip.cpp index d825fc2241985a1c9a2ea97525d2e34967f6ea69..8d0afca6f4562afecbc670a38b7e32609ad26787 100644 --- a/NvTriStrip/NvTriStrip.cpp +++ b/NvTriStrip/NvTriStrip.cpp @@ -2,6 +2,7 @@ #include "NvTriStripObjects.h" #include "NvTriStrip.h" #include <string.h> // memset +#include <cstddef> // NULL using namespace NvTriStrip; diff --git a/NvTriStrip/NvTriStripObjects.h b/NvTriStrip/NvTriStripObjects.h index c8588a74862cf6636c52400ef93b09a8690a6c18..f8d66a48e9fed4b8016c57c2f445b6baade3ba72 100644 --- a/NvTriStrip/NvTriStripObjects.h +++ b/NvTriStrip/NvTriStripObjects.h @@ -5,6 +5,7 @@ #include <assert.h> #include <vector> #include <list> +#include <cstddef> // NULL #include "VertexCache.h" //Wrap these types in a namespace diff --git a/TriStripper/detail/policy.h b/TriStripper/detail/policy.h index df4addbcefac02ca221abb6a6d586147c57087e5..5726add60d9286b2349a63e6d3e6c884d24a831a 100644 --- a/TriStripper/detail/policy.h +++ b/TriStripper/detail/policy.h @@ -26,17 +26,17 @@ namespace triangle_stripper { class policy { public: - policy(size_t MinStripSize, bool Cache); + policy(std::size_t MinStripSize, bool Cache); strip BestStrip() const; - void Challenge(strip Strip, size_t Degree, size_t CacheHits); + void Challenge(strip Strip, std::size_t Degree, std::size_t CacheHits); private: strip m_Strip; - size_t m_Degree; - size_t m_CacheHits; + std::size_t m_Degree; + std::size_t m_CacheHits; - const size_t m_MinStripSize; + const std::size_t m_MinStripSize; const bool m_Cache; }; @@ -44,7 +44,7 @@ private: -inline policy::policy(size_t MinStripSize, bool Cache) +inline policy::policy(std::size_t MinStripSize, bool Cache) : m_Degree(0), m_CacheHits(0), m_MinStripSize(MinStripSize), m_Cache(Cache) { } diff --git a/TriStripper/detail/types.h b/TriStripper/detail/types.h index ff7b026a08e5f163dd92902093c22bf3cf949078..8eb940e51882b4a45ac7fe62f08b60126ac0692b 100644 --- a/TriStripper/detail/types.h +++ b/TriStripper/detail/types.h @@ -28,8 +28,8 @@ public: : m_A(A), m_B(B), m_C(C), m_StripID(0) { } void ResetStripID() { m_StripID = 0; } - void SetStripID(size_t StripID) { m_StripID = StripID; } - size_t StripID() const { return m_StripID; } + void SetStripID(std::size_t StripID) { m_StripID = StripID; } + std::size_t StripID() const { return m_StripID; } index A() const { return m_A; } index B() const { return m_B; } @@ -40,7 +40,7 @@ private: index m_B; index m_C; - size_t m_StripID; + std::size_t m_StripID; }; @@ -75,17 +75,17 @@ public: strip() : m_Start(0), m_Order(ABC), m_Size(0) { } - strip(size_t Start, triangle_order Order, size_t Size) + strip(std::size_t Start, triangle_order Order, std::size_t Size) : m_Start(Start), m_Order(Order), m_Size(Size) { } - size_t Start() const { return m_Start; } + std::size_t Start() const { return m_Start; } triangle_order Order() const { return m_Order; } - size_t Size() const { return m_Size; } + std::size_t Size() const { return m_Size; } private: - size_t m_Start; + std::size_t m_Start; triangle_order m_Order; - size_t m_Size; + std::size_t m_Size; }; diff --git a/TriStripper/policy.cpp b/TriStripper/policy.cpp index a0a8e101102df939f529d2af525aa1c2ebfd7c59..224f6798670a979dd7cbb287f5d6d78ff15ec9b6 100644 --- a/TriStripper/policy.cpp +++ b/TriStripper/policy.cpp @@ -19,7 +19,7 @@ namespace triangle_stripper { -void policy::Challenge(strip Strip, size_t Degree, size_t CacheHits) +void policy::Challenge(strip Strip, std::size_t Degree, std::size_t CacheHits) { if (Strip.Size() < m_MinStripSize) return; diff --git a/TriStripper/public_types.h b/TriStripper/public_types.h index 66cca5cf178a22cff1bdda2fa4fec50f5dc10fd0..d6df1d1bfc23cf0715df23a5fceb8b891dc3e93c 100644 --- a/TriStripper/public_types.h +++ b/TriStripper/public_types.h @@ -18,7 +18,7 @@ namespace triangle_stripper { - typedef size_t index; + typedef std::size_t index; typedef std::vector<index> indices; enum primitive_type