@ -112,7 +112,7 @@ struct TypesetBookImpl : TypesetBook
Contents : : iterator i = mContents . insert ( mContents . end ( ) , Content ( text . first , text . second ) ) ;
if ( i - > empty ( ) )
return Range ( Utf8Point ( NULL ) , Utf8Point ( NULL ) ) ;
return Range ( Utf8Point ( nullptr ) , Utf8Point ( nullptr ) ) ;
Utf8Point begin = & i - > front ( ) ;
Utf8Point end = & i - > front ( ) + i - > size ( ) ;
@ -150,7 +150,7 @@ struct TypesetBookImpl : TypesetBook
template < typename Visitor >
void visitRuns ( int top , int bottom , Visitor const & visitor ) const
{
visitRuns ( top , bottom , NULL , visitor ) ;
visitRuns ( top , bottom , nullptr , visitor ) ;
}
StyleImpl * hitTest ( int left , int top ) const
@ -187,7 +187,7 @@ struct TypesetBookImpl : TypesetBook
for ( Styles : : iterator i = mStyles . begin ( ) ; i ! = mStyles . end ( ) ; + + i )
if ( & * i = = style )
return i - > mFont ;
return NULL ;
return nullptr ;
}
struct Typesetter ;
@ -227,8 +227,8 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
Typesetter ( size_t width , size_t height ) :
mPageWidth ( width ) , mPageHeight ( height ) ,
mSection ( NULL ) , mLine ( NULL ) , mRun ( NULL ) ,
mCurrentContent ( NULL ) ,
mSection ( nullptr ) , mLine ( nullptr ) , mRun ( nullptr ) ,
mCurrentContent ( nullptr ) ,
mCurrentAlignment ( AlignLeft )
{
mBook = std : : make_shared < Book > ( ) ;
@ -306,7 +306,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
void write ( Style * style , size_t begin , size_t end )
{
assert ( mCurrentContent ! = NULL ) ;
assert ( mCurrentContent ! = nullptr ) ;
assert ( end < = mCurrentContent - > size ( ) ) ;
assert ( begin < = mCurrentContent - > size ( ) ) ;
@ -322,8 +322,8 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
add_partial_text ( ) ;
mRun = NULL ;
mLine = NULL ;
mRun = nullptr ;
mLine = nullptr ;
}
void sectionBreak ( int margin )
@ -332,9 +332,9 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
if ( mBook - > mSections . size ( ) > 0 )
{
mRun = NULL ;
mLine = NULL ;
mSection = NULL ;
mRun = nullptr ;
mLine = nullptr ;
mSection = nullptr ;
if ( mBook - > mRect . bottom < ( mBook - > mSections . back ( ) . mRect . bottom + margin ) )
mBook - > mRect . bottom = ( mBook - > mSections . back ( ) . mRect . bottom + margin ) ;
@ -345,7 +345,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
{
add_partial_text ( ) ;
if ( mSection ! = NULL )
if ( mSection ! = nullptr )
mSectionAlignment . back ( ) = sectionAlignment ;
mCurrentAlignment = sectionAlignment ;
}
@ -449,7 +449,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
{
add_partial_text ( ) ;
stream . consume ( ) ;
mLine = NULL , mRun = NULL ;
mLine = nullptr , mRun = nullptr ;
continue ;
}
@ -508,7 +508,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
if ( left + space_width + word_width > mPageWidth )
{
mLine = NULL , mRun = NULL , left = 0 ;
mLine = nullptr , mRun = nullptr , left = 0 ;
}
else
{
@ -539,7 +539,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
void append_run ( StyleImpl * style , Utf8Stream : : Point begin , Utf8Stream : : Point end , int pc , int right , int bottom )
{
if ( mSection = = NULL )
if ( mSection = = nullptr )
{
mBook - > mSections . push_back ( Section ( ) ) ;
mSection = & mBook - > mSections . back ( ) ;
@ -547,7 +547,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
mSectionAlignment . push_back ( mCurrentAlignment ) ;
}
if ( mLine = = NULL )
if ( mLine = = nullptr )
{
mSection - > mLines . push_back ( Line ( ) ) ;
mLine = & mSection - > mLines . back ( ) ;
@ -572,7 +572,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
if ( mLine - > mRect . bottom < bottom )
mLine - > mRect . bottom = bottom ;
if ( mRun = = NULL | | mRun - > mStyle ! = style | | mRun - > mRange . second ! = begin )
if ( mRun = = nullptr | | mRun - > mStyle ! = style | | mRun - > mRange . second ! = begin )
{
int left = mRun ? mRun - > mRight : mLine - > mRect . left ;
@ -802,17 +802,17 @@ protected:
TextFormat ( MyGUI : : IFont * id , PageDisplay * display ) :
mFont ( id ) ,
mCountVertex ( 0 ) ,
mTexture ( NULL ) ,
mRenderItem ( NULL ) ,
mTexture ( nullptr ) ,
mRenderItem ( nullptr ) ,
mDisplay ( display )
{
}
void createDrawItem ( MyGUI : : ILayerNode * node )
{
assert ( mRenderItem = = NULL ) ;
assert ( mRenderItem = = nullptr ) ;
if ( mTexture ! = NULL )
if ( mTexture ! = nullptr )
{
mRenderItem = node - > addToRenderItem ( mTexture , false , false ) ;
mRenderItem - > addDrawItem ( this , mCountVertex ) ;
@ -821,12 +821,12 @@ protected:
void destroyDrawItem ( MyGUI : : ILayerNode * node )
{
assert ( mTexture ! = NULL ? mRenderItem ! = NULL : mRenderItem = = NULL ) ;
assert ( mTexture ! = nullptr ? mRenderItem ! = nullptr : mRenderItem = = nullptr ) ;
if ( mTexture ! = NULL )
if ( mTexture ! = nullptr )
{
mRenderItem - > removeDrawItem ( this ) ;
mRenderItem = NULL ;
mRenderItem = nullptr ;
}
}
@ -879,9 +879,9 @@ public:
resetPage ( ) ;
mViewTop = 0 ;
mViewBottom = 0 ;
mFocusItem = NULL ;
mFocusItem = nullptr ;
mItemActive = false ;
mNode = NULL ;
mNode = nullptr ;
}
void dirtyFocusItem ( )
@ -999,14 +999,14 @@ public:
for ( ActiveTextFormats : : iterator i = mActiveTextFormats . begin ( ) ; i ! = mActiveTextFormats . end ( ) ; + + i )
{
if ( mNode ! = NULL )
if ( mNode ! = nullptr )
i - > second - > destroyDrawItem ( mNode ) ;
delete i - > second ;
}
mActiveTextFormats . clear ( ) ;
if ( newBook ! = NULL )
if ( newBook ! = nullptr )
{
createActiveFormats ( newBook ) ;
@ -1035,7 +1035,7 @@ public:
else
if ( mBook & & isPageDifferent ( newPage ) )
{
if ( mNode ! = NULL )
if ( mNode ! = nullptr )
for ( ActiveTextFormats : : iterator i = mActiveTextFormats . begin ( ) ; i ! = mActiveTextFormats . end ( ) ; + + i )
mNode - > outOfDate ( i - > second - > mRenderItem ) ;
@ -1083,7 +1083,7 @@ public:
{
newBook - > visitRuns ( 0 , 0x7FFFFFFF , CreateActiveFormat ( this ) ) ;
if ( mNode ! = NULL )
if ( mNode ! = nullptr )
for ( ActiveTextFormats : : iterator i = mActiveTextFormats . begin ( ) ; i ! = mActiveTextFormats . end ( ) ; + + i )
i - > second - > createDrawItem ( mNode ) ;
}
@ -1187,7 +1187,7 @@ public:
{
_checkMargin ( ) ;
if ( mNode ! = NULL )
if ( mNode ! = nullptr )
for ( ActiveTextFormats : : iterator i = mActiveTextFormats . begin ( ) ; i ! = mActiveTextFormats . end ( ) ; + + i )
mNode - > outOfDate ( i - > second - > mRenderItem ) ;
@ -1198,7 +1198,7 @@ public:
for ( ActiveTextFormats : : iterator i = mActiveTextFormats . begin ( ) ; i ! = mActiveTextFormats . end ( ) ; + + i )
i - > second - > destroyDrawItem ( mNode ) ;
mNode = NULL ;
mNode = nullptr ;
}
} ;