The MinGW.OSDN Installation Manager Tool
Revisión | 3615999b305997fbd231041763498e5096236c3f (tree) |
---|---|
Tiempo | 2020-06-22 23:10:29 |
Autor | Keith Marshall <keith@user...> |
Commiter | Keith Marshall |
Ignore spin wait requests with no designated referrer.
@@ -1,5 +1,13 @@ | ||
1 | 1 | 2020-06-22 Keith Marshall <keith@users.osdn.me> |
2 | 2 | |
3 | + Ignore spin wait requests with no designated referrer. | |
4 | + | |
5 | + * src/pkgstat.h (pkgSpinWait::UpdateIndex) [this]: Cannot test for | |
6 | + nullptr, since C++ specifies result as "undefined behaviour"; test... | |
7 | + [referrer]: ...this predesignated static class property instead. | |
8 | + | |
9 | +2020-06-22 Keith Marshall <keith@users.osdn.me> | |
10 | + | |
3 | 11 | Support options interpretation from an unborn options object. |
4 | 12 | |
5 | 13 | * src/pkgopts.h (pkgOpts::Test, pkgOpts::IsSet, pkgOpts::GetValue) |
@@ -4,8 +4,8 @@ | ||
4 | 4 | * |
5 | 5 | * $Id$ |
6 | 6 | * |
7 | - * Written by Keith Marshall <keithmarshall@users.sourceforge.net> | |
8 | - * Copyright (C) 2012, MinGW.org Project | |
7 | + * Written by Keith Marshall <keith@users.osdn.me> | |
8 | + * Copyright (C) 2012, 2020, MinGW.org Project | |
9 | 9 | * |
10 | 10 | * |
11 | 11 | * Public declaration of the pkgSpinWait class, which provides an |
@@ -47,7 +47,7 @@ class pkgSpinWait | ||
47 | 47 | protected: |
48 | 48 | static pkgSpinWait *referrer; int index; |
49 | 49 | pkgSpinWait( void ): index( 0 ){ referrer = this; } |
50 | - int UpdateIndex(){ return this ? index = (1 + index) % 4 : 0; } | |
50 | + int UpdateIndex(){ return referrer ? index = (1 + index) % 4 : 0; } | |
51 | 51 | virtual int DispatchReport( const char *, va_list ) = 0; |
52 | 52 | ~pkgSpinWait(){ referrer = NULL; } |
53 | 53 | }; |