mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-27 14:00:10 +00:00
Fix Win build
This commit is contained in:
parent
d0a624f373
commit
9e25b193ff
@ -26,9 +26,10 @@
|
||||
#define HUD_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <cstdarg>
|
||||
#include <math.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "hud.h"
|
||||
|
||||
@ -128,7 +129,8 @@ protected:
|
||||
void SetValue(float v) {
|
||||
value = std::max(std::min(v, max), min);
|
||||
if (intStep) {
|
||||
value = (int)value;
|
||||
// MSVC 2010 does not have std::round() or roundf()
|
||||
value = v>0.0f ? floor(v+0.5f) : ceil(v-0.5f);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -436,7 +436,7 @@ Vtr::Array<PatchDescriptor::Type>
|
||||
PatchTables::getFVarPatchTypes(int channel) {
|
||||
FVarPatchChannel & c = getFVarPatchChannel(channel);
|
||||
return Vtr::Array<PatchDescriptor::Type>(&c.patchTypes[0],
|
||||
c.patchTypes.size());
|
||||
(int)c.patchTypes.size());
|
||||
}
|
||||
Vtr::ConstArray<PatchDescriptor::Type>
|
||||
PatchTables::GetFVarPatchTypes(int channel) const {
|
||||
@ -445,18 +445,18 @@ PatchTables::GetFVarPatchTypes(int channel) const {
|
||||
return Vtr::ConstArray<PatchDescriptor::Type>(&c.patchesType, 1);
|
||||
} else {
|
||||
return Vtr::ConstArray<PatchDescriptor::Type>(&c.patchTypes[0],
|
||||
c.patchTypes.size());
|
||||
(int)c.patchTypes.size());
|
||||
}
|
||||
}
|
||||
ConstIndexArray
|
||||
PatchTables::GetFVarPatchesValues(int channel) const {
|
||||
FVarPatchChannel const & c = getFVarPatchChannel(channel);
|
||||
return ConstIndexArray(&c.patchValues[0], c.patchValues.size());
|
||||
return ConstIndexArray(&c.patchValues[0], (int)c.patchValues.size());
|
||||
}
|
||||
IndexArray
|
||||
PatchTables::getFVarPatchesValues(int channel) {
|
||||
FVarPatchChannel & c = getFVarPatchChannel(channel);
|
||||
return IndexArray(&c.patchValues[0], c.patchValues.size());
|
||||
return IndexArray(&c.patchValues[0], (int)c.patchValues.size());
|
||||
}
|
||||
PatchDescriptor::Type
|
||||
PatchTables::getFVarPatchType(int channel, int patch) const {
|
||||
|
Loading…
Reference in New Issue
Block a user