|
Revision 11181, 1.1 kB
(checked in by robert, 3 years ago)
|
|
From Laurens Voerman, "my compiler (VC Express 9) gives some warnings (see below) about not being able to generate an assignment operator. As those assignment operators are not used and problably should never be used, I solved this by creating an private (empty) assingment operator.
"
From Robert Osfield, added "return *this;" to Laurens's addition to prevent them generating a warning under gcc...
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | #ifndef TRI_STRIPPER_HEADER_GUARD_POLICY_H |
|---|
| 11 | #define TRI_STRIPPER_HEADER_GUARD_POLICY_H |
|---|
| 12 | |
|---|
| 13 | #include "public_types.h" |
|---|
| 14 | #include "types.h" |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | namespace triangle_stripper { |
|---|
| 20 | |
|---|
| 21 | namespace detail { |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | class policy |
|---|
| 27 | { |
|---|
| 28 | public: |
|---|
| 29 | policy(size_t MinStripSize, bool Cache); |
|---|
| 30 | |
|---|
| 31 | strip BestStrip() const; |
|---|
| 32 | void Challenge(strip Strip, size_t Degree, size_t CacheHits); |
|---|
| 33 | |
|---|
| 34 | private: |
|---|
| 35 | policy& operator = (const policy&) { return *this; } |
|---|
| 36 | strip m_Strip; |
|---|
| 37 | size_t m_Degree; |
|---|
| 38 | size_t m_CacheHits; |
|---|
| 39 | |
|---|
| 40 | const size_t m_MinStripSize; |
|---|
| 41 | const bool m_Cache; |
|---|
| 42 | }; |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | |
|---|
| 47 | |
|---|
| 48 | inline policy::policy(size_t MinStripSize, bool Cache) |
|---|
| 49 | : m_Degree(0), m_CacheHits(0), m_MinStripSize(MinStripSize), m_Cache(Cache) { } |
|---|
| 50 | |
|---|
| 51 | |
|---|
| 52 | inline strip policy::BestStrip() const |
|---|
| 53 | { |
|---|
| 54 | return m_Strip; |
|---|
| 55 | } |
|---|
| 56 | |
|---|
| 57 | |
|---|
| 58 | |
|---|
| 59 | |
|---|
| 60 | } |
|---|
| 61 | |
|---|
| 62 | } |
|---|
| 63 | |
|---|
| 64 | |
|---|
| 65 | |
|---|
| 66 | |
|---|
| 67 | #endif // TRI_STRIPPER_HEADER_GUARD_POLICY_H |
|---|