Fixed Coverity reported issues.

WindowManager.cpp
CID 11841: Uninitialized pointer field (UNINIT_CTOR)
Non-static class member _lastEvent is not initialized in this constructor nor in any functions that it calls.
Non-static class member _lastPush is not initialized in this constructor nor in any functions that it calls.
Non-static class member _view is not initialized in this constructor nor in any functions that it calls.

Frame.cpp
CID 11840: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _flags is not initialized in this constructor nor in any functions that it calls.

Window.cpp
CID 11839: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member _index is not initialized in this constructor nor in any functions that it calls.
This commit is contained in:
Robert Osfield
2011-05-06 10:29:47 +00:00
parent 3d300c38d0
commit 4f5152152d
4 changed files with 63 additions and 42 deletions

View File

@@ -139,20 +139,21 @@ void Window::EmbeddedWindow::updateSizeFromWindow() {
}
Window::Window(const std::string& name):
_parent (0),
_wm (0),
_index (0),
_x (0.0f),
_y (0.0f),
_z (0.0f),
_zRange (0.0f),
_strata (STRATA_NONE),
_vis (VM_FULL),
_r (0.0f),
_s (1.0f),
_scaleDenom (100.0f),
_vAnchor (VA_NONE),
_hAnchor (HA_NONE) {
_parent (0),
_wm (0),
_index (0),
_x (0.0f),
_y (0.0f),
_z (0.0f),
_zRange (0.0f),
_strata (STRATA_NONE),
_vis (VM_FULL),
_r (0.0f),
_s (1.0f),
_scaleDenom (100.0f),
_vAnchor (VA_NONE),
_hAnchor (HA_NONE)
{
_name = name.size() ? name : generateRandomName("Window");
// TODO: Fix the "bg" name.
@@ -177,25 +178,27 @@ _hAnchor (HA_NONE) {
}
Window::Window(const Window& window, const osg::CopyOp& co):
MatrixTransform (window, co),
EventInterface (window),
StyleInterface (window),
_parent (0),
_wm (0),
_x (window._x),
_y (window._y),
_z (window._z),
_zRange (window._zRange),
_strata (window._strata),
_vis (window._vis),
_r (window._r),
_s (window._s),
_scaleDenom (window._scaleDenom),
_width (window._width),
_height (window._height),
_vAnchor (window._vAnchor),
_hAnchor (window._hAnchor),
_visibleArea (window._visibleArea) {
MatrixTransform (window, co),
EventInterface (window),
StyleInterface (window),
_parent (0),
_wm (0),
_index (0),
_x (window._x),
_y (window._y),
_z (window._z),
_zRange (window._zRange),
_strata (window._strata),
_vis (window._vis),
_r (window._r),
_s (window._s),
_scaleDenom (window._scaleDenom),
_width (window._width),
_height (window._height),
_vAnchor (window._vAnchor),
_hAnchor (window._hAnchor),
_visibleArea (window._visibleArea)
{
// Construct our vector of Widgets for easier use. :)
// TODO: I almost certainly will need to use the getPosition() thing here eventually
// for things to work 100% properly. For example, some Geodes may contain labels,