Use static local variable for consistency with compressor, dispatch table
This commit is contained in:
@@ -18,8 +18,6 @@
|
||||
|
||||
#include "select.h"
|
||||
|
||||
Select *Select::instance = NULL;
|
||||
|
||||
fd_set Select::dummy_fd_set;
|
||||
|
||||
sigset_t Select::dummy_sigset;
|
||||
|
||||
+3
-7
@@ -34,16 +34,12 @@
|
||||
class Select {
|
||||
public:
|
||||
static Select &get_instance( void ) {
|
||||
// NB: not thread-safe
|
||||
if ( !instance ) {
|
||||
instance = new Select;
|
||||
}
|
||||
return *instance;
|
||||
/* COFU may or may not be thread-safe, depending on compiler */
|
||||
static Select instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
private:
|
||||
static Select *instance;
|
||||
|
||||
Select()
|
||||
: max_fd( -1 )
|
||||
, got_any_signal( 0 )
|
||||
|
||||
Reference in New Issue
Block a user