Ignore:
Timestamp:
Aug 3, 2009, 2:29:12 PM (15 years ago)
Author:
Christoph Mayer
Message:

maemo segfault wegen static object ctors workaround

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/communication/EndpointDescriptor.h

    r5502 r5624  
    5656
    5757public:
    58         /// the unspecified endpoint descriptor
    59         static const EndpointDescriptor UNSPECIFIED;
    60 
    6158        /// creates an empty endpoint descriptor with zero endpoints
    6259        EndpointDescriptor();
     
    7976        }
    8077
     78        static EndpointDescriptor& UNSPECIFIED() {
     79                static EndpointDescriptor* unspec = NULL;
     80                if(unspec == NULL) unspec = new EndpointDescriptor();
     81
     82                return *unspec;
     83        }
     84
    8185        /// returns true, if this object is the unspecified object
    8286        bool isUnspecified() const {
    83                 return this == &UNSPECIFIED;
     87                return (this == &UNSPECIFIED());
    8488        }
    8589
Note: See TracChangeset for help on using the changeset viewer.