Fix build warnings

This commit is contained in:
Seth Hillbrand 2021-01-24 11:37:48 -08:00
parent 04cc64c008
commit 47d5900600
1 changed files with 4 additions and 8 deletions

View File

@ -1293,12 +1293,10 @@ int EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
if( selection.Empty() )
return 0;
OPT<VECTOR2I> oldRefPt;
OPT<VECTOR2I> oldRefPt = boost::make_optional<VECTOR2I>( false, VECTOR2I( 0, 0 ) );
if( selection.HasReferencePoint() )
oldRefPt = selection.GetReferencePoint();
else
oldRefPt = NULLOPT;
updateModificationPoint( selection );
@ -1342,7 +1340,7 @@ int EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
// Restore the old reference so any mouse dragging that occurs doesn't make the selection jump
// to this now invalid reference
if( oldRefPt != NULLOPT )
if( oldRefPt )
selection.SetReferencePoint( *oldRefPt );
else
selection.ClearReferencePoint();
@ -1549,12 +1547,10 @@ int EDIT_TOOL::Flip( const TOOL_EVENT& aEvent )
if( selection.Empty() )
return 0;
OPT<VECTOR2I> oldRefPt;
OPT<VECTOR2I> oldRefPt = boost::make_optional<VECTOR2I>( false, VECTOR2I( 0, 0 ) );
if( selection.HasReferencePoint() )
oldRefPt = selection.GetReferencePoint();
else
oldRefPt = NULLOPT;
updateModificationPoint( selection );
@ -1606,7 +1602,7 @@ int EDIT_TOOL::Flip( const TOOL_EVENT& aEvent )
// Restore the old reference so any mouse dragging that occurs doesn't make the selection jump
// to this now invalid reference
if( oldRefPt != NULLOPT )
if( oldRefPt )
selection.SetReferencePoint( *oldRefPt );
else
selection.ClearReferencePoint();