mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2025-01-01 12:50:13 +00:00
Fix build warnings (icc -w3)
This commit is contained in:
parent
865fe5591f
commit
e1b6434968
@ -45,7 +45,13 @@ static char const * errors[] = {
|
||||
|
||||
void SetErrorCallback(ErrorCallbackFunc func) {
|
||||
|
||||
#ifdef __INTEL_COMPILER
|
||||
#pragma warning disable 1711
|
||||
#endif
|
||||
errorFunc = func;
|
||||
#ifdef __INTEL_COMPILER
|
||||
#pragma warning enable 1711
|
||||
#endif
|
||||
}
|
||||
|
||||
void Error(ErrorType err) {
|
||||
@ -78,7 +84,13 @@ static WarningCallbackFunc warningFunc = 0;
|
||||
|
||||
void SetWarningCallback(WarningCallbackFunc func) {
|
||||
|
||||
#ifdef __INTEL_COMPILER
|
||||
#pragma warning disable 1711
|
||||
#endif
|
||||
warningFunc = func;
|
||||
#ifdef __INTEL_COMPILER
|
||||
#pragma warning enable 1711
|
||||
#endif
|
||||
}
|
||||
|
||||
void Warning(const char *format, ...) {
|
||||
|
@ -42,19 +42,21 @@ typedef enum {
|
||||
|
||||
typedef void (*ErrorCallbackFunc)(ErrorType err, const char *message);
|
||||
|
||||
/// Sets the error callback function (default is "printf")
|
||||
/// \brief Sets the error callback function (default is "printf")
|
||||
///
|
||||
/// \note This function is not thread-safe !
|
||||
///
|
||||
/// @param func function pointer to the callback function
|
||||
///
|
||||
void SetErrorCallback(ErrorCallbackFunc func);
|
||||
|
||||
/// Sends an OSD error
|
||||
/// \brief Sends an OSD error
|
||||
///
|
||||
/// @param err the error type
|
||||
///
|
||||
void Error(ErrorType err);
|
||||
|
||||
/// Sends an OSD error with a message
|
||||
/// \brief Sends an OSD error with a message
|
||||
///
|
||||
/// @param err the error type
|
||||
///
|
||||
@ -63,16 +65,18 @@ void Error(ErrorType err);
|
||||
void Error(ErrorType err, const char *format, ...);
|
||||
|
||||
|
||||
/// Sets the warning callback function (default is "printf")
|
||||
/// \brief Sets the warning callback function (default is "printf")
|
||||
typedef void (*WarningCallbackFunc)(const char *message);
|
||||
|
||||
/// Sets the warning callback function (default is "printf")
|
||||
/// \brief Sets the warning callback function (default is "printf")
|
||||
///
|
||||
/// \note This function is not thread-safe !
|
||||
///
|
||||
/// @param func function pointer to the callback function
|
||||
///
|
||||
void SetWarningCallback(WarningCallbackFunc func);
|
||||
|
||||
/// Sends an OSD warning message
|
||||
/// \brief Sends an OSD warning message
|
||||
///
|
||||
/// @param format the format of the message (followed by arguments)
|
||||
///
|
||||
|
@ -465,10 +465,10 @@ ProtoBasis::ProtoBasis(Vtr::Level const & level, Index faceIndex) {
|
||||
np = abs(valences[ip]),
|
||||
nm = abs(valences[im]);
|
||||
|
||||
LocalIndex start = quadOffsets[vid*2+0],
|
||||
prev = quadOffsets[vid*2+1],
|
||||
start_m = quadOffsets[im*2],
|
||||
prev_p = quadOffsets[ip*2+1];
|
||||
Index start = quadOffsets[vid*2+0],
|
||||
prev = quadOffsets[vid*2+1],
|
||||
start_m = quadOffsets[im*2],
|
||||
prev_p = quadOffsets[ip*2+1];
|
||||
|
||||
Point Em_ip, Ep_im;
|
||||
|
||||
|
@ -55,12 +55,12 @@ public:
|
||||
|
||||
struct Options {
|
||||
|
||||
Options(unsigned int maxIsolationLevel=10) :
|
||||
Options(unsigned int maxIsolation=10) :
|
||||
generateAllLevels(false),
|
||||
triangulateQuads(false),
|
||||
generateFVarTables(false),
|
||||
useSingleCreasePatch(false),
|
||||
maxIsolationLevel(maxIsolationLevel),
|
||||
maxIsolationLevel(maxIsolation),
|
||||
adaptiveStencilTables(0) { }
|
||||
|
||||
unsigned int generateAllLevels : 1, ///< Include levels from 'firstLevel' to 'maxLevel' (Uniform mode only)
|
||||
|
@ -52,7 +52,7 @@ public:
|
||||
|
||||
enum Mode {
|
||||
INTERPOLATE_VERTEX=0,
|
||||
INTERPOLATE_VARYING,
|
||||
INTERPOLATE_VARYING
|
||||
};
|
||||
|
||||
struct Options {
|
||||
|
@ -580,10 +580,10 @@ private:
|
||||
Sdc::Type _subdivType;
|
||||
Sdc::Options _subdivOptions;
|
||||
|
||||
unsigned char _isUniform : 1,
|
||||
_hasHoles : 1,
|
||||
_useSingleCreasePatch : 1,
|
||||
_maxLevel : 4;
|
||||
unsigned int _isUniform : 1,
|
||||
_hasHoles : 1,
|
||||
_useSingleCreasePatch : 1,
|
||||
_maxLevel : 4;
|
||||
|
||||
std::vector<Vtr::Level *> _levels;
|
||||
std::vector<Vtr::Refinement *> _refinements;
|
||||
|
@ -318,7 +318,7 @@ FVarRefinement::populateChildValuesFromEdgeVertices() {
|
||||
_childFVar._valueCount ++;
|
||||
} else {
|
||||
int cValueCount = populateChildValuesForEdgeVertex(cVert, pEdge);
|
||||
_childFVar._vertSiblingCounts[cVert] = cValueCount;
|
||||
_childFVar._vertSiblingCounts[cVert] = (LocalIndex)cValueCount;
|
||||
_childFVar._valueCount += cValueCount;
|
||||
}
|
||||
}
|
||||
@ -337,7 +337,7 @@ FVarRefinement::populateChildValuesFromVertexVertices() {
|
||||
_childFVar._valueCount ++;
|
||||
} else {
|
||||
int cValueCount = populateChildValuesForVertexVertex(cVert, pVert);
|
||||
_childFVar._vertSiblingCounts[cVert] = cValueCount;
|
||||
_childFVar._vertSiblingCounts[cVert] = (LocalIndex)cValueCount;
|
||||
_childFVar._valueCount += cValueCount;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user