mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-12 15:10:33 +00:00
Fix Intel compiler warning
This commit is contained in:
parent
0e5c320248
commit
59382abeaa
@ -32,6 +32,8 @@
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
#pragma warning disable 1572 //floating-point equality and inequality comparisons are unreliable
|
||||
|
||||
namespace OpenSubdiv {
|
||||
namespace OPENSUBDIV_VERSION {
|
||||
|
||||
|
@ -133,11 +133,11 @@ EndCapGregoryBasisPatchFactory::GetPatchPoints(
|
||||
|
||||
{ // Gather adjacent faces
|
||||
ConstIndexArray adjfaces = level->getEdgeFaces(edge);
|
||||
for (int i=0; i<adjfaces.size(); ++i) {
|
||||
if (adjfaces[i]==faceIndex) {
|
||||
for (int j=0; j<adjfaces.size(); ++j) {
|
||||
if (adjfaces[j]==faceIndex) {
|
||||
// XXXX manuelk if 'edge' is non-manifold, arbitrarily pick the
|
||||
// next face in the list of adjacent faces
|
||||
adjface = (adjfaces[(i+1)%adjfaces.size()]);
|
||||
adjface = (adjfaces[(j+1)%adjfaces.size()]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -156,7 +156,7 @@ EndCapGregoryBasisPatchFactory::GetPatchPoints(
|
||||
// Find index of basis in the list of basis already generated
|
||||
struct compare {
|
||||
static int op(void const * a, void const * b) {
|
||||
return *(Index *)a - *(Index *)b;
|
||||
return *(Index const*)a - *(Index const*)b;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -112,7 +112,7 @@ EndCapLegacyGregoryPatchFactory::Finalize(
|
||||
size_t numTotalGregoryPatches =
|
||||
numGregoryPatches + numGregoryBoundaryPatches;
|
||||
|
||||
Vtr::internal::Level const &level = _refiner.getLevel(_refiner.GetMaxLevel());
|
||||
Vtr::internal::Level const &maxLevel = _refiner.getLevel(_refiner.GetMaxLevel());
|
||||
|
||||
quadOffsetsTable->resize(numTotalGregoryPatches*4);
|
||||
|
||||
@ -120,11 +120,11 @@ EndCapLegacyGregoryPatchFactory::Finalize(
|
||||
PatchTable::QuadOffsetsTable::value_type *p =
|
||||
&((*quadOffsetsTable)[0]);
|
||||
for (size_t i = 0; i < numGregoryPatches; ++i) {
|
||||
getQuadOffsets(level, _gregoryFaceIndices[i], p);
|
||||
getQuadOffsets(maxLevel, _gregoryFaceIndices[i], p);
|
||||
p += 4;
|
||||
}
|
||||
for (size_t i = 0; i < numGregoryBoundaryPatches; ++i) {
|
||||
getQuadOffsets(level, _gregoryBoundaryFaceIndices[i], p);
|
||||
getQuadOffsets(maxLevel, _gregoryBoundaryFaceIndices[i], p);
|
||||
p += 4;
|
||||
}
|
||||
}
|
||||
|
@ -39,6 +39,9 @@
|
||||
namespace OpenSubdiv {
|
||||
namespace OPENSUBDIV_VERSION {
|
||||
|
||||
#pragma warning disable 1572 // floating-point equality and inequality comparisons are unreliable
|
||||
#pragma warning disable 177 // getNumArrays is never referenced
|
||||
|
||||
namespace {
|
||||
//
|
||||
// A convenience container for the different types of feature adaptive patches
|
||||
@ -1163,7 +1166,7 @@ PatchTableFactory::populateAdaptivePatches(
|
||||
permutation = permuteCorner[bIndex];
|
||||
level->gatherQuadRegularCornerPatchPoints(faceIndex, patchVerts, bIndex);
|
||||
} else {
|
||||
assert(patchTag._boundaryCount >=0 && patchTag._boundaryCount <= 2);
|
||||
assert(patchTag._boundaryCount >0 && patchTag._boundaryCount <= 2);
|
||||
}
|
||||
|
||||
offsetAndPermuteIndices(patchVerts, 16, levelVertOffset, permutation, iptrs.R);
|
||||
|
@ -25,6 +25,8 @@
|
||||
#include "../far/stencilBuilder.h"
|
||||
#include "../far/topologyRefiner.h"
|
||||
|
||||
#pragma warning disable 1572 //floating-point equality and inequality comparisons are unreliable
|
||||
|
||||
namespace OpenSubdiv {
|
||||
namespace OPENSUBDIV_VERSION {
|
||||
|
||||
|
@ -133,6 +133,8 @@ class StencilTable {
|
||||
|
||||
public:
|
||||
|
||||
virtual ~StencilTable() {};
|
||||
|
||||
/// \brief Returns the number of stencils in the table
|
||||
int GetNumStencils() const {
|
||||
return (int)_sizes.size();
|
||||
|
@ -40,6 +40,8 @@ namespace OPENSUBDIV_VERSION {
|
||||
|
||||
namespace Far {
|
||||
|
||||
#pragma warning disable 1572 // floating-point equality and inequality comparisons are unreliable
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void
|
||||
|
@ -63,10 +63,10 @@ struct PatchCoord {
|
||||
|
||||
struct PatchArray {
|
||||
// 4-ints struct.
|
||||
PatchArray(Far::PatchDescriptor desc, int numPatches,
|
||||
int indexBase, int primitiveIdBase) :
|
||||
desc(desc), numPatches(numPatches), indexBase(indexBase),
|
||||
primitiveIdBase(primitiveIdBase) {}
|
||||
PatchArray(Far::PatchDescriptor desc_in, int numPatches_in,
|
||||
int indexBase_in, int primitiveIdBase_in) :
|
||||
desc(desc_in), numPatches(numPatches_in), indexBase(indexBase_in),
|
||||
primitiveIdBase(primitiveIdBase_in) {}
|
||||
|
||||
Far::PatchDescriptor const &GetDescriptor() const {
|
||||
return desc;
|
||||
|
@ -36,6 +36,8 @@
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#pragma warning disable 1572 // floating-point equality and inequality comparisons are unreliable
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user