mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-09 22:00:06 +00:00
hbr: fix warnings in the Hbr*Edit constructors
warning C4242: 'initializing' : conversion from 'int' to 'const unsigned char', possible loss of data
This commit is contained in:
parent
b25226134f
commit
08ca7af0c9
@ -83,7 +83,7 @@ public:
|
||||
}
|
||||
|
||||
HbrCornerEdit(int _faceid, int _nsubfaces, int *_subfaces, int _vertexid, typename HbrHierarchicalEdit<T>::Operation _op, float _sharpness)
|
||||
: HbrHierarchicalEdit<T>(_faceid, _nsubfaces, _subfaces), vertexid(_vertexid), op(_op), sharpness(_sharpness) {
|
||||
: HbrHierarchicalEdit<T>(_faceid, _nsubfaces, _subfaces), vertexid(static_cast<unsigned char>(_vertexid)), op(_op), sharpness(_sharpness) {
|
||||
}
|
||||
|
||||
virtual ~HbrCornerEdit() {}
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
}
|
||||
|
||||
HbrCreaseEdit(int _faceid, int _nsubfaces, int *_subfaces, int _edgeid, typename HbrHierarchicalEdit<T>::Operation _op, float _sharpness)
|
||||
: HbrHierarchicalEdit<T>(_faceid, _nsubfaces, _subfaces), edgeid(_edgeid), op(_op), sharpness(_sharpness) {
|
||||
: HbrHierarchicalEdit<T>(_faceid, _nsubfaces, _subfaces), edgeid(static_cast<unsigned char>(_edgeid)), op(_op), sharpness(_sharpness) {
|
||||
}
|
||||
|
||||
virtual ~HbrCreaseEdit() {}
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
}
|
||||
|
||||
HbrVertexEdit(int _faceid, int _nsubfaces, int *_subfaces, int _vertexid, int _index, int _width, bool _isP, typename HbrHierarchicalEdit<T>::Operation _op, float *_edit)
|
||||
: HbrHierarchicalEdit<T>(_faceid, _nsubfaces, _subfaces), vertexid(_vertexid), index(_index), width(_width), isP(_isP), op(_op) {
|
||||
: HbrHierarchicalEdit<T>(_faceid, _nsubfaces, _subfaces), vertexid(static_cast<unsigned char>(_vertexid)), index(_index), width(_width), isP(_isP), op(_op) {
|
||||
edit = new float[width];
|
||||
memcpy(edit, _edit, width * sizeof(float));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user