@ -140,6 +140,7 @@ namespace MWWorld
virtual void clearDynamic ( )
{
// remove the dynamic part of mShared
if ( mShared . size ( ) > mStatic . size ( ) )
mShared . erase ( mShared . begin ( ) + mStatic . size ( ) , mShared . end ( ) ) ;
mDynamic . clear ( ) ;
}
@ -217,6 +218,7 @@ namespace MWWorld
void setUp ( ) {
// remove the dynamic part of mShared
if ( mShared . size ( ) > mStatic . size ( ) )
mShared . erase ( mShared . begin ( ) + mStatic . size ( ) , mShared . end ( ) ) ;
}
@ -305,6 +307,7 @@ namespace MWWorld
mDynamic . erase ( it ) ;
// have to reinit the whole shared part
if ( mShared . size ( ) > mStatic . size ( ) )
mShared . erase ( mShared . begin ( ) + mStatic . size ( ) , mShared . end ( ) ) ;
for ( it = mDynamic . begin ( ) ; it ! = mDynamic . end ( ) ; + + it ) {
mShared . push_back ( & it - > second ) ;
@ -338,20 +341,6 @@ namespace MWWorld
}
} ;
template < >
inline void Store < ESM : : NPC > : : clearDynamic ( )
{
std : : map < std : : string , ESM : : NPC > : : iterator iter = mDynamic . begin ( ) ;
while ( iter ! = mDynamic . end ( ) )
if ( iter - > first = = " player " )
+ + iter ;
else
mDynamic . erase ( iter + + ) ;
mShared . clear ( ) ;
}
template < >
inline void Store < ESM : : Dialogue > : : load ( ESM : : ESMReader & esm , const std : : string & id ) {
std : : string idLower = Misc : : StringUtils : : lowerCase ( id ) ;