convert SpriteChangeRecord::ChangeType to scoped enum

Change-Id: I29696f37a023317bdaa8f53d753ccaeb8e68a3c2
This commit is contained in:
Noel Grandin
2016-02-23 10:19:08 +02:00
parent b952aaacb1
commit 5c43ca5518
2 changed files with 6 additions and 6 deletions

View File

@@ -60,7 +60,7 @@ namespace canvas
{
switch( rSpriteRecord.meChangeType )
{
case SpriteRedrawManager::SpriteChangeRecord::move:
case SpriteRedrawManager::SpriteChangeRecord::ChangeType::move:
if( !mbIsMove )
{
// no move yet - this must be the first one
@@ -73,7 +73,7 @@ namespace canvas
maMoveEndArea = rSpriteRecord.maUpdateArea;
break;
case SpriteRedrawManager::SpriteChangeRecord::update:
case SpriteRedrawManager::SpriteChangeRecord::ChangeType::update:
// update end update area of the
// sprite. Thus, every update() action
// _after_ the last move will correctly

View File

@@ -143,10 +143,10 @@ namespace canvas
*/
struct SpriteChangeRecord
{
typedef enum{ none=0, move, update } ChangeType;
enum class ChangeType { none=0, move, update };
SpriteChangeRecord() :
meChangeType( none ),
meChangeType( ChangeType::none ),
mpAffectedSprite(),
maOldPos(),
maUpdateArea()
@@ -157,7 +157,7 @@ namespace canvas
const ::basegfx::B2DPoint& rOldPos,
const ::basegfx::B2DPoint& rNewPos,
const ::basegfx::B2DVector& rSpriteSize ) :
meChangeType( move ),
meChangeType( ChangeType::move ),
mpAffectedSprite( rSprite ),
maOldPos( rOldPos ),
maUpdateArea( rNewPos.getX(),
@@ -170,7 +170,7 @@ namespace canvas
SpriteChangeRecord( const Sprite::Reference& rSprite,
const ::basegfx::B2DPoint& rPos,
const ::basegfx::B2DRange& rUpdateArea ) :
meChangeType( update ),
meChangeType( ChangeType::update ),
mpAffectedSprite( rSprite ),
maOldPos( rPos ),
maUpdateArea( rUpdateArea )