Skip to content

Commit 967e632

Browse files
Merge pull request #1196 from vsg-dev/gcc_13_warning_fixes
Renamed ArrayState::clone() to ArrayState::cloneArrayState() to fix gcc 13 warnings.
2 parents b78e18b + 99d5abb commit 967e632

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

include/vsg/state/ArrayState.h

+12-12
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ namespace vsg
3131
ArrayState(const ArrayState& rhs, const CopyOp& copyop = {});
3232

3333
/// clone self
34-
virtual ref_ptr<ArrayState> clone()
34+
virtual ref_ptr<ArrayState> cloneArrayState()
3535
{
3636
return ArrayState::create(*this);
3737
}
3838

3939
// clone the specified ArrayState
40-
virtual ref_ptr<ArrayState> clone(ref_ptr<ArrayState> arrayState)
40+
virtual ref_ptr<ArrayState> cloneArrayState(ref_ptr<ArrayState> arrayState)
4141
{
4242
return ArrayState::create(*arrayState);
4343
}
@@ -99,8 +99,8 @@ namespace vsg
9999
NullArrayState();
100100
explicit NullArrayState(const ArrayState& as);
101101

102-
ref_ptr<ArrayState> clone() override;
103-
ref_ptr<ArrayState> clone(ref_ptr<ArrayState> arrayState) override;
102+
ref_ptr<ArrayState> cloneArrayState() override;
103+
ref_ptr<ArrayState> cloneArrayState(ref_ptr<ArrayState> arrayState) override;
104104

105105
using ArrayState::apply;
106106

@@ -117,8 +117,8 @@ namespace vsg
117117
PositionArrayState(const PositionArrayState& rhs);
118118
explicit PositionArrayState(const ArrayState& rhs);
119119

120-
ref_ptr<ArrayState> clone() override;
121-
ref_ptr<ArrayState> clone(ref_ptr<ArrayState> arrayState) override;
120+
ref_ptr<ArrayState> cloneArrayState() override;
121+
ref_ptr<ArrayState> cloneArrayState(ref_ptr<ArrayState> arrayState) override;
122122

123123
uint32_t position_attribute_location = 4;
124124
AttributeDetails positionAttribute;
@@ -138,8 +138,8 @@ namespace vsg
138138
DisplacementMapArrayState(const DisplacementMapArrayState& rhs);
139139
explicit DisplacementMapArrayState(const ArrayState& rhs);
140140

141-
ref_ptr<ArrayState> clone() override;
142-
ref_ptr<ArrayState> clone(ref_ptr<ArrayState> arrayState) override;
141+
ref_ptr<ArrayState> cloneArrayState() override;
142+
ref_ptr<ArrayState> cloneArrayState(ref_ptr<ArrayState> arrayState) override;
143143

144144
// binding of displacement map
145145
uint32_t normal_attribute_location = 1;
@@ -175,8 +175,8 @@ namespace vsg
175175
uint32_t position_attribute_location = 4;
176176
AttributeDetails positionAttribute;
177177

178-
ref_ptr<ArrayState> clone() override;
179-
ref_ptr<ArrayState> clone(ref_ptr<ArrayState> arrayState) override;
178+
ref_ptr<ArrayState> cloneArrayState() override;
179+
ref_ptr<ArrayState> cloneArrayState(ref_ptr<ArrayState> arrayState) override;
180180

181181
void apply(const VertexInputState& vas) override;
182182
ref_ptr<const vec3Array> vertexArray(uint32_t instanceIndex) override;
@@ -191,8 +191,8 @@ namespace vsg
191191
BillboardArrayState(const BillboardArrayState& rhs);
192192
explicit BillboardArrayState(const ArrayState& rhs);
193193

194-
ref_ptr<ArrayState> clone() override;
195-
ref_ptr<ArrayState> clone(ref_ptr<ArrayState> arrayState) override;
194+
ref_ptr<ArrayState> cloneArrayState() override;
195+
ref_ptr<ArrayState> cloneArrayState(ref_ptr<ArrayState> arrayState) override;
196196

197197
uint32_t position_attribute_location = 4;
198198
AttributeDetails positionAttribute;

src/vsg/state/ArrayState.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,13 @@ NullArrayState::NullArrayState(const ArrayState& as) :
179179
vertices = {};
180180
}
181181

182-
ref_ptr<ArrayState> NullArrayState::clone()
182+
ref_ptr<ArrayState> NullArrayState::cloneArrayState()
183183
{
184184
return NullArrayState::create(*this);
185185
}
186186

187187
// clone the specified ArrayState
188-
ref_ptr<ArrayState> NullArrayState::clone(ref_ptr<ArrayState> arrayState)
188+
ref_ptr<ArrayState> NullArrayState::cloneArrayState(ref_ptr<ArrayState> arrayState)
189189
{
190190
return NullArrayState::create(*arrayState);
191191
}
@@ -220,12 +220,12 @@ PositionArrayState::PositionArrayState(const ArrayState& rhs) :
220220
{
221221
}
222222

223-
ref_ptr<ArrayState> PositionArrayState::clone()
223+
ref_ptr<ArrayState> PositionArrayState::cloneArrayState()
224224
{
225225
return PositionArrayState::create(*this);
226226
}
227227

228-
ref_ptr<ArrayState> PositionArrayState::clone(ref_ptr<ArrayState> arrayState)
228+
ref_ptr<ArrayState> PositionArrayState::cloneArrayState(ref_ptr<ArrayState> arrayState)
229229
{
230230
return PositionArrayState::create(*arrayState);
231231
}
@@ -273,12 +273,12 @@ DisplacementMapArrayState::DisplacementMapArrayState(const ArrayState& rhs) :
273273
{
274274
}
275275

276-
ref_ptr<ArrayState> DisplacementMapArrayState::clone()
276+
ref_ptr<ArrayState> DisplacementMapArrayState::cloneArrayState()
277277
{
278278
return DisplacementMapArrayState::create(*this);
279279
}
280280

281-
ref_ptr<ArrayState> DisplacementMapArrayState::clone(ref_ptr<ArrayState> arrayState)
281+
ref_ptr<ArrayState> DisplacementMapArrayState::cloneArrayState(ref_ptr<ArrayState> arrayState)
282282
{
283283
return DisplacementMapArrayState::create(*arrayState);
284284
}
@@ -380,12 +380,12 @@ PositionAndDisplacementMapArrayState::PositionAndDisplacementMapArrayState(const
380380
{
381381
}
382382

383-
ref_ptr<ArrayState> PositionAndDisplacementMapArrayState::clone()
383+
ref_ptr<ArrayState> PositionAndDisplacementMapArrayState::cloneArrayState()
384384
{
385385
return PositionAndDisplacementMapArrayState::create(*this);
386386
}
387387

388-
ref_ptr<ArrayState> PositionAndDisplacementMapArrayState::clone(ref_ptr<ArrayState> arrayState)
388+
ref_ptr<ArrayState> PositionAndDisplacementMapArrayState::cloneArrayState(ref_ptr<ArrayState> arrayState)
389389
{
390390
return PositionAndDisplacementMapArrayState::create(*arrayState);
391391
}
@@ -457,12 +457,12 @@ BillboardArrayState::BillboardArrayState(const ArrayState& rhs) :
457457
{
458458
}
459459

460-
ref_ptr<ArrayState> BillboardArrayState::clone()
460+
ref_ptr<ArrayState> BillboardArrayState::cloneArrayState()
461461
{
462462
return BillboardArrayState::create(*this);
463463
}
464464

465-
ref_ptr<ArrayState> BillboardArrayState::clone(ref_ptr<ArrayState> arrayState)
465+
ref_ptr<ArrayState> BillboardArrayState::cloneArrayState(ref_ptr<ArrayState> arrayState)
466466
{
467467
return BillboardArrayState::create(*arrayState);
468468
}

src/vsg/utils/ComputeBounds.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void ComputeBounds::apply(const vsg::Object& object)
4545

4646
void ComputeBounds::apply(const StateGroup& stategroup)
4747
{
48-
auto arrayState = stategroup.prototypeArrayState ? stategroup.prototypeArrayState->clone(arrayStateStack.back()) : arrayStateStack.back()->clone();
48+
auto arrayState = stategroup.prototypeArrayState ? stategroup.prototypeArrayState->cloneArrayState(arrayStateStack.back()) : arrayStateStack.back()->cloneArrayState();
4949

5050
for (auto& statecommand : stategroup.stateCommands)
5151
{

src/vsg/utils/Intersector.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void Intersector::apply(const StateGroup& stategroup)
5757
{
5858
PushPopNode ppn(_nodePath, &stategroup);
5959

60-
auto arrayState = stategroup.prototypeArrayState ? stategroup.prototypeArrayState->clone(arrayStateStack.back()) : arrayStateStack.back()->clone();
60+
auto arrayState = stategroup.prototypeArrayState ? stategroup.prototypeArrayState->cloneArrayState(arrayStateStack.back()) : arrayStateStack.back()->cloneArrayState();
6161

6262
for (auto& statecommand : stategroup.stateCommands)
6363
{

0 commit comments

Comments
 (0)