Fix static analyzer message "Expression is always true"
V547 Expression '_isFloating == true' is always true. dockingcont.cpp 1080 V547 Expression 'itemSelected == 2' is always true. treeview.cpp 504 V560 A part of conditional expression is always true: 0xff. babygrid.cpp 711
This commit is contained in:
parent
8a01e5e29b
commit
9181f70d47
|
@ -1077,13 +1077,10 @@ void DockingCont::onSize()
|
|||
else
|
||||
{
|
||||
// update floating size
|
||||
if (_isFloating == true)
|
||||
for (size_t iTb = 0, len = _vTbData.size(); iTb < len; ++iTb)
|
||||
{
|
||||
for (size_t iTb = 0, len = _vTbData.size(); iTb < len; ++iTb)
|
||||
{
|
||||
getWindowRect(_vTbData[iTb]->rcFloat);
|
||||
}
|
||||
}
|
||||
getWindowRect(_vTbData[iTb]->rcFloat);
|
||||
}
|
||||
|
||||
// draw caption
|
||||
if (iItemCnt >= 2)
|
||||
|
|
|
@ -708,7 +708,7 @@ TCHAR GetASCII(WPARAM wParam, LPARAM lParam)
|
|||
BYTE keys[256];
|
||||
WORD dwReturnedValue;
|
||||
GetKeyboardState(keys);
|
||||
result = ToAscii(static_cast<UINT>(wParam), (lParam >> 16) && 0xff, keys, &dwReturnedValue, 0);
|
||||
result = ToAscii(static_cast<UINT>(wParam), (lParam >> 16) & 0xff, keys, &dwReturnedValue, 0);
|
||||
returnvalue = (TCHAR) dwReturnedValue;
|
||||
if(returnvalue < 0){returnvalue = 0;}
|
||||
wsprintf(mbuffer, TEXT("return value = %d"), returnvalue);
|
||||
|
|
|
@ -495,16 +495,16 @@ bool TreeView::swapTreeViewItem(HTREEITEM itemGoDown, HTREEITEM itemGoUp)
|
|||
removeItem(itemGoDown);
|
||||
|
||||
// Restore the selection if needed
|
||||
if (itemSelected != 0)
|
||||
switch (itemSelected)
|
||||
{
|
||||
if (itemSelected == 1)
|
||||
{
|
||||
case 1:
|
||||
selectItem(hTreeParent2ndInserted);
|
||||
}
|
||||
else if (itemSelected == 2)
|
||||
{
|
||||
break;
|
||||
case 2:
|
||||
selectItem(hTreeParent1stInserted);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue