#include "wx/event.h"
#include "wx/app.h"
#include "wx/log.h"
+
+#if wxUSE_CONFIG
+
#include "wx/config.h"
#ifndef __WIN16__
{
wxLogNull nolog;
m_keyGlobalRoot.Open();
+ m_keyGlobal.Open();
}
}
// are we already enumerating local entries?
if ( m_keyGlobal.IsOpened() && !IS_LOCAL_INDEX(lIndex) ) {
// try to find a global entry which doesn't appear locally
- do {
- if ( !m_keyGlobal.GetNextKey(str, lIndex) ) {
- // no more global entries
- lIndex |= LOCAL_MASK;
- break;
+ while ( m_keyGlobal.GetNextKey(str, lIndex) ) {
+ if ( !m_keyLocal.HasSubKey(str) ) {
+ // ok, found one - return it
+ return TRUE;
}
- } while( m_keyLocal.HasSubKey(str) );
+ }
+
+ // no more global entries
+ lIndex |= LOCAL_MASK;
}
// much easier with local entries: get the next one we find
// are we already enumerating local entries?
if ( m_keyGlobal.IsOpened() && !IS_LOCAL_INDEX(lIndex) ) {
// try to find a global entry which doesn't appear locally
- do {
- if ( !m_keyGlobal.GetNextValue(str, lIndex) ) {
- // no more global entries
- lIndex |= LOCAL_MASK;
- break;
+ while ( m_keyGlobal.GetNextValue(str, lIndex) ) {
+ if ( !m_keyLocal.HasValue(str) ) {
+ // ok, found one - return it
+ return TRUE;
}
- } while( m_keyLocal.HasValue(str) );
+ }
+
+ // no more global entries
+ lIndex |= LOCAL_MASK;
}
// much easier with local entries: get the next one we find
#endif
// __WIN16__
+#endif
+ // wxUSE_CONFIG