2020-06-22 Keith Marshall <keith@users.osdn.me>
+ Ignore spin wait requests with no designated referrer.
+
+ * src/pkgstat.h (pkgSpinWait::UpdateIndex) [this]: Cannot test for
+ nullptr, since C++ specifies result as "undefined behaviour"; test...
+ [referrer]: ...this predesignated static class property instead.
+
+2020-06-22 Keith Marshall <keith@users.osdn.me>
+
Support options interpretation from an unborn options object.
* src/pkgopts.h (pkgOpts::Test, pkgOpts::IsSet, pkgOpts::GetValue)
*
* $Id$
*
- * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- * Copyright (C) 2012, MinGW.org Project
+ * Written by Keith Marshall <keith@users.osdn.me>
+ * Copyright (C) 2012, 2020, MinGW.org Project
*
*
* Public declaration of the pkgSpinWait class, which provides an
protected:
static pkgSpinWait *referrer; int index;
pkgSpinWait( void ): index( 0 ){ referrer = this; }
- int UpdateIndex(){ return this ? index = (1 + index) % 4 : 0; }
+ int UpdateIndex(){ return referrer ? index = (1 + index) % 4 : 0; }
virtual int DispatchReport( const char *, va_list ) = 0;
~pkgSpinWait(){ referrer = NULL; }
};