Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-09-26 03:04:44 +0300
committerCampbell Barton <campbell@blender.org>2022-09-26 03:09:15 +0300
commit8a68f4f80814a28d68055a0ae0b22a7efe1c2619 (patch)
treec89d4c3343836b0b8321be1beb55d7b547a6d6a3 /source/blender/freestyle/intern/scene_graph
parent15f3cf7f8f956a6372b6a99788b622946ba3d1e5 (diff)
Cleanup: replace unsigned with uint, use function style casts for C++
Diffstat (limited to 'source/blender/freestyle/intern/scene_graph')
-rw-r--r--source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp70
-rw-r--r--source/blender/freestyle/intern/scene_graph/SceneHash.cpp4
-rw-r--r--source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.cpp2
3 files changed, 38 insertions, 38 deletions
diff --git a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp
index c3559fe6e15..3962ac0aa35 100644
--- a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp
+++ b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp
@@ -34,26 +34,26 @@ IndexedFaceSet::IndexedFaceSet()
}
IndexedFaceSet::IndexedFaceSet(float *iVertices,
- unsigned iVSize,
+ uint iVSize,
float *iNormals,
- unsigned iNSize,
+ uint iNSize,
FrsMaterial **iMaterials,
- unsigned iMSize,
+ uint iMSize,
float *iTexCoords,
- unsigned iTSize,
- unsigned iNumFaces,
- unsigned *iNumVertexPerFace,
+ uint iTSize,
+ uint iNumFaces,
+ uint *iNumVertexPerFace,
TRIANGLES_STYLE *iFaceStyle,
FaceEdgeMark *iFaceEdgeMarks,
- unsigned *iVIndices,
- unsigned iVISize,
- unsigned *iNIndices,
- unsigned iNISize,
- unsigned *iMIndices,
- unsigned iMISize,
- unsigned *iTIndices,
- unsigned iTISize,
- unsigned iCopy)
+ uint *iVIndices,
+ uint iVISize,
+ uint *iNIndices,
+ uint iNISize,
+ uint *iMIndices,
+ uint iMISize,
+ uint *iTIndices,
+ uint iTISize,
+ uint iCopy)
{
if (1 == iCopy) {
_VSize = iVSize;
@@ -80,8 +80,8 @@ IndexedFaceSet::IndexedFaceSet(float *iVertices,
}
_NumFaces = iNumFaces;
- _NumVertexPerFace = new unsigned[_NumFaces];
- memcpy(_NumVertexPerFace, iNumVertexPerFace, _NumFaces * sizeof(unsigned));
+ _NumVertexPerFace = new uint[_NumFaces];
+ memcpy(_NumVertexPerFace, iNumVertexPerFace, _NumFaces * sizeof(uint));
_FaceStyle = new TRIANGLES_STYLE[_NumFaces];
memcpy(_FaceStyle, iFaceStyle, _NumFaces * sizeof(TRIANGLES_STYLE));
@@ -90,24 +90,24 @@ IndexedFaceSet::IndexedFaceSet(float *iVertices,
memcpy(_FaceEdgeMarks, iFaceEdgeMarks, _NumFaces * sizeof(FaceEdgeMark));
_VISize = iVISize;
- _VIndices = new unsigned[_VISize];
- memcpy(_VIndices, iVIndices, _VISize * sizeof(unsigned));
+ _VIndices = new uint[_VISize];
+ memcpy(_VIndices, iVIndices, _VISize * sizeof(uint));
_NISize = iNISize;
- _NIndices = new unsigned[_NISize];
- memcpy(_NIndices, iNIndices, _NISize * sizeof(unsigned));
+ _NIndices = new uint[_NISize];
+ memcpy(_NIndices, iNIndices, _NISize * sizeof(uint));
_MISize = iMISize;
_MIndices = nullptr;
if (iMIndices) {
- _MIndices = new unsigned[_MISize];
- memcpy(_MIndices, iMIndices, _MISize * sizeof(unsigned));
+ _MIndices = new uint[_MISize];
+ memcpy(_MIndices, iMIndices, _MISize * sizeof(uint));
}
_TISize = iTISize;
_TIndices = nullptr;
if (_TISize) {
- _TIndices = new unsigned[_TISize];
- memcpy(_TIndices, iTIndices, _TISize * sizeof(unsigned));
+ _TIndices = new uint[_TISize];
+ memcpy(_TIndices, iTIndices, _TISize * sizeof(uint));
}
}
else {
@@ -177,8 +177,8 @@ IndexedFaceSet::IndexedFaceSet(const IndexedFaceSet &iBrother) : Rep(iBrother)
}
_NumFaces = iBrother.numFaces();
- _NumVertexPerFace = new unsigned[_NumFaces];
- memcpy(_NumVertexPerFace, iBrother.numVertexPerFaces(), _NumFaces * sizeof(unsigned));
+ _NumVertexPerFace = new uint[_NumFaces];
+ memcpy(_NumVertexPerFace, iBrother.numVertexPerFaces(), _NumFaces * sizeof(uint));
_FaceStyle = new TRIANGLES_STYLE[_NumFaces];
memcpy(_FaceStyle, iBrother.trianglesStyle(), _NumFaces * sizeof(TRIANGLES_STYLE));
@@ -187,17 +187,17 @@ IndexedFaceSet::IndexedFaceSet(const IndexedFaceSet &iBrother) : Rep(iBrother)
memcpy(_FaceEdgeMarks, iBrother.faceEdgeMarks(), _NumFaces * sizeof(FaceEdgeMark));
_VISize = iBrother.visize();
- _VIndices = new unsigned[_VISize];
- memcpy(_VIndices, iBrother.vindices(), _VISize * sizeof(unsigned));
+ _VIndices = new uint[_VISize];
+ memcpy(_VIndices, iBrother.vindices(), _VISize * sizeof(uint));
_NISize = iBrother.nisize();
- _NIndices = new unsigned[_NISize];
- memcpy(_NIndices, iBrother.nindices(), _NISize * sizeof(unsigned));
+ _NIndices = new uint[_NISize];
+ memcpy(_NIndices, iBrother.nindices(), _NISize * sizeof(uint));
_MISize = iBrother.misize();
if (_MISize) {
- _MIndices = new unsigned[_MISize];
- memcpy(_MIndices, iBrother.mindices(), _MISize * sizeof(unsigned));
+ _MIndices = new uint[_MISize];
+ memcpy(_MIndices, iBrother.mindices(), _MISize * sizeof(uint));
}
else {
_MIndices = nullptr;
@@ -206,8 +206,8 @@ IndexedFaceSet::IndexedFaceSet(const IndexedFaceSet &iBrother) : Rep(iBrother)
_TISize = iBrother.tisize();
_TIndices = nullptr;
if (_TISize) {
- _TIndices = new unsigned[_TISize];
- memcpy(_TIndices, iBrother.tindices(), _TISize * sizeof(unsigned));
+ _TIndices = new uint[_TISize];
+ memcpy(_TIndices, iBrother.tindices(), _TISize * sizeof(uint));
}
}
diff --git a/source/blender/freestyle/intern/scene_graph/SceneHash.cpp b/source/blender/freestyle/intern/scene_graph/SceneHash.cpp
index 3e6c8f924a1..a4ef70722d0 100644
--- a/source/blender/freestyle/intern/scene_graph/SceneHash.cpp
+++ b/source/blender/freestyle/intern/scene_graph/SceneHash.cpp
@@ -42,9 +42,9 @@ void SceneHash::visitNodeCamera(NodeCamera &cam)
void SceneHash::visitIndexedFaceSet(IndexedFaceSet &ifs)
{
const float *v = ifs.vertices();
- const unsigned n = ifs.vsize();
+ const uint n = ifs.vsize();
- for (unsigned i = 0; i < n; i++) {
+ for (uint i = 0; i < n; i++) {
adler32((uchar *)&v[i], sizeof(v[i]));
}
}
diff --git a/source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.cpp b/source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.cpp
index 5ac41b6f234..6c5ea5ffd8a 100644
--- a/source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.cpp
+++ b/source/blender/freestyle/intern/scene_graph/ScenePrettyPrinter.cpp
@@ -73,7 +73,7 @@ VISIT(VertexRep)
void ScenePrettyPrinter::visitIndexedFaceSet(IndexedFaceSet &ifs)
{
const float *vertices = ifs.vertices();
- unsigned vsize = ifs.vsize();
+ uint vsize = ifs.vsize();
_ofs << _space << "IndexedFaceSet" << endl;
const float *p = vertices;