mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-12-22 16:00:07 +00:00
Fix MacOS X build when using Apple LLVM compiler (Clang).
The order of defining the nested classes inside FarPatchTables confused this rather strict compiler. Simply move the FarPatchTables::Descriptor::iterator code a little later in the file to remove the confusion.
This commit is contained in:
parent
a0b2f56837
commit
f8cad451d3
@ -200,15 +200,11 @@ public:
|
||||
class iterator;
|
||||
|
||||
/// Returns an iterator to the first type of patch (REGULAR NON_TRANSITION ROT0)
|
||||
static iterator begin() {
|
||||
return iterator( Descriptor(REGULAR, NON_TRANSITION, 0) );
|
||||
}
|
||||
static iterator begin();
|
||||
|
||||
/// Returns an iterator to the end of the list of patch types (NON_PATCH)
|
||||
static iterator end() {
|
||||
return iterator( Descriptor() );
|
||||
}
|
||||
|
||||
static iterator end();
|
||||
|
||||
private:
|
||||
template <class T> friend class FarPatchTablesFactory;
|
||||
friend class iterator;
|
||||
@ -219,35 +215,6 @@ public:
|
||||
};
|
||||
|
||||
|
||||
/// \brief Descriptor iterator class
|
||||
class Descriptor::iterator {
|
||||
public:
|
||||
/// Constructor
|
||||
iterator() {}
|
||||
|
||||
/// Copy Constructor
|
||||
iterator(Descriptor desc) : pos(desc) { }
|
||||
|
||||
/// Iteration increment operator
|
||||
iterator & operator ++ () { ++pos; return *this; }
|
||||
|
||||
/// True of the two descriptors are identical
|
||||
bool operator == ( iterator const & other ) const { return (pos==other.pos); }
|
||||
|
||||
/// True if the two descriptors are different
|
||||
bool operator != ( iterator const & other ) const { return not (*this==other); }
|
||||
|
||||
/// Dereferencing operator
|
||||
Descriptor * operator -> () { return &pos; }
|
||||
|
||||
/// Dereferencing operator
|
||||
Descriptor & operator * () { return pos; }
|
||||
|
||||
private:
|
||||
Descriptor pos;
|
||||
};
|
||||
|
||||
|
||||
/// \brief Describes an array of patches of the same type
|
||||
class PatchArray {
|
||||
|
||||
@ -505,6 +472,45 @@ private:
|
||||
int _maxValence;
|
||||
};
|
||||
|
||||
/// \brief Descriptor iterator class
|
||||
class FarPatchTables::Descriptor::iterator {
|
||||
public:
|
||||
/// Constructor
|
||||
iterator() {}
|
||||
|
||||
/// Copy Constructor
|
||||
iterator(FarPatchTables::Descriptor desc) : pos(desc) { }
|
||||
|
||||
/// Iteration increment operator
|
||||
iterator & operator ++ () { ++pos; return *this; }
|
||||
|
||||
/// True of the two descriptors are identical
|
||||
bool operator == ( iterator const & other ) const { return (pos==other.pos); }
|
||||
|
||||
/// True if the two descriptors are different
|
||||
bool operator != ( iterator const & other ) const { return not (*this==other); }
|
||||
|
||||
/// Dereferencing operator
|
||||
FarPatchTables::Descriptor * operator -> () { return &pos; }
|
||||
|
||||
/// Dereferencing operator
|
||||
FarPatchTables::Descriptor & operator * () { return pos; }
|
||||
|
||||
private:
|
||||
FarPatchTables::Descriptor pos;
|
||||
};
|
||||
|
||||
|
||||
/// Returns an iterator to the first type of patch (REGULAR NON_TRANSITION ROT0)
|
||||
inline FarPatchTables::Descriptor::iterator FarPatchTables::Descriptor::begin() {
|
||||
return FarPatchTables::Descriptor::iterator( FarPatchTables::Descriptor(REGULAR, NON_TRANSITION, 0) );
|
||||
}
|
||||
|
||||
/// Returns an iterator to the end of the list of patch types (NON_PATCH)
|
||||
inline FarPatchTables::Descriptor::iterator FarPatchTables::Descriptor::end() {
|
||||
return FarPatchTables::Descriptor::iterator( FarPatchTables::Descriptor() );
|
||||
}
|
||||
|
||||
// Constructor
|
||||
inline
|
||||
FarPatchTables::FarPatchTables(PatchArrayVector const & patchArrays,
|
||||
|
Loading…
Reference in New Issue
Block a user