Skip to content

Commit 10be81c

Browse files
Mafo369dlyr
authored andcommitted
[tests] small refactor
1 parent b5de8c9 commit 10be81c

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

examples/CurveEditor/CurveEditor.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ void CurveEditor::subdivisionBezier( int vertexIndex,
210210
auto ptE = PointFactory::createPointComponent(
211211
this, clickedPoint, { curveIndex, curveIndex + 1 }, m_pointEntities.size(), Color::Blue() );
212212
m_pointEntities.insert( m_pointEntities.begin() + firstInsertionIdx, ptE );
213+
213214
ptE = PointFactory::createPointComponent(
214215
this, fourthPoint, { curveIndex }, m_pointEntities.size() );
215216
m_pointEntities.insert( m_pointEntities.begin() + firstInsertionIdx, ptE );
@@ -225,7 +226,6 @@ void CurveEditor::subdivisionBezier( int vertexIndex,
225226
newCtrlPts1.push_back( ctrlPts[3] );
226227

227228
auto curveE = CurveFactory::createCurveComponent( this, newCtrlPts1, m_curveEntities.size() );
228-
229229
m_curveEntities.insert( m_curveEntities.begin() + curveIndex + 1, curveE );
230230

231231
for ( unsigned int i = ( ( curveIndex + 1 ) * 3 + 2 ); i < m_pointEntities.size(); i++ ) {
@@ -255,12 +255,15 @@ void CurveEditor::addPointAtEnd( const Vector3& worldPos ) {
255255

256256
unsigned int pointIndex = lastIndex + 1;
257257
last->m_curveId.push_back( ( pointIndex / 3 ) );
258+
258259
auto ptC =
259260
PointFactory::createPointComponent( this, ctrlPts[1], { ( pointIndex / 3 ) }, pointIndex );
260261
m_pointEntities.push_back( ptC );
261-
auto eb = PointFactory::createPointComponent(
262+
263+
ptC = PointFactory::createPointComponent(
262264
this, ctrlPts[2], { ( pointIndex / 3 ) }, pointIndex + 1 );
263-
m_pointEntities.push_back( eb );
265+
m_pointEntities.push_back( ptC );
266+
264267
ptC = PointFactory::createPointComponent(
265268
this, ctrlPts[3], { ( pointIndex / 3 ) }, pointIndex + 2, Color::Blue() );
266269
m_pointEntities.push_back( ptC );

0 commit comments

Comments
 (0)