root/OpenSceneGraph/trunk/src/osgUtil/tristripper/include/detail/policy.h @ 11181

Revision 11181, 1.1 kB (checked in by robert, 4 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// Copyright (C) 2004 Tanguy Fautré.
3// For conditions of distribution and use,
4// see copyright notice in tri_stripper.h
5//
6//////////////////////////////////////////////////////////////////////
7// SVN: $Id: policy.h 86 2005-06-08 17:47:27Z gpsnoopy $
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
19namespace triangle_stripper {
20
21        namespace detail {
22
23
24
25
26class policy
27{
28public:
29        policy(size_t MinStripSize, bool Cache);
30
31        strip BestStrip() const;
32        void Challenge(strip Strip, size_t Degree, size_t CacheHits);
33
34private:
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
48inline policy::policy(size_t MinStripSize, bool Cache)
49: m_Degree(0), m_CacheHits(0), m_MinStripSize(MinStripSize), m_Cache(Cache) { }
50
51
52inline strip policy::BestStrip() const
53{
54        return m_Strip;
55}
56
57
58
59
60        } // namespace detail
61
62} // namespace triangle_stripper
63
64
65
66
67#endif // TRI_STRIPPER_HEADER_GUARD_POLICY_H
Note: See TracBrowser for help on using the browser.