Fixed Coverity reported issue.
CID 11831: Uninitialized pointer field (UNINIT_CTOR) Non-static class member _context is not initialized in this constructor nor in any functions that it calls. Non-static class member _dc is not initialized in this constructor nor in any functions that it calls. Non-static class member _handle is not initialized in this constructor nor in any functions that it calls. Non-static class member _instance is not initialized in this constructor nor in any functions that it calls.
This commit is contained in:
@@ -188,7 +188,14 @@ static std::string sysError()
|
||||
class TemporaryWindow: public osg::Referenced
|
||||
{
|
||||
public:
|
||||
TemporaryWindow();
|
||||
TemporaryWindow():
|
||||
_handle(0),
|
||||
_dc(0),
|
||||
_context(0),
|
||||
_instance(0)
|
||||
{
|
||||
create();
|
||||
}
|
||||
|
||||
HWND getHandle() const { return _handle; }
|
||||
HDC getDC() const { return _dc; }
|
||||
@@ -198,7 +205,13 @@ public:
|
||||
|
||||
protected:
|
||||
~TemporaryWindow();
|
||||
TemporaryWindow(const TemporaryWindow &) {}
|
||||
|
||||
TemporaryWindow(const TemporaryWindow &):
|
||||
_handle(0),
|
||||
_dc(0),
|
||||
_context(0),
|
||||
_instance(0) {}
|
||||
|
||||
TemporaryWindow &operator=(const TemporaryWindow &) { return *this; }
|
||||
|
||||
void create();
|
||||
@@ -212,15 +225,6 @@ private:
|
||||
std::string _classname;
|
||||
};
|
||||
|
||||
TemporaryWindow::TemporaryWindow()
|
||||
: _handle(0),
|
||||
_dc(0),
|
||||
_context(0),
|
||||
_instance(0)
|
||||
{
|
||||
create();
|
||||
}
|
||||
|
||||
void TemporaryWindow::create()
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
||||
Reference in New Issue
Block a user