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,12 +1077,9 @@ void DockingCont::onSize()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// update floating size
|
// 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
|
// draw caption
|
||||||
|
|
|
@ -708,7 +708,7 @@ TCHAR GetASCII(WPARAM wParam, LPARAM lParam)
|
||||||
BYTE keys[256];
|
BYTE keys[256];
|
||||||
WORD dwReturnedValue;
|
WORD dwReturnedValue;
|
||||||
GetKeyboardState(keys);
|
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;
|
returnvalue = (TCHAR) dwReturnedValue;
|
||||||
if(returnvalue < 0){returnvalue = 0;}
|
if(returnvalue < 0){returnvalue = 0;}
|
||||||
wsprintf(mbuffer, TEXT("return value = %d"), returnvalue);
|
wsprintf(mbuffer, TEXT("return value = %d"), returnvalue);
|
||||||
|
|
|
@ -495,16 +495,16 @@ bool TreeView::swapTreeViewItem(HTREEITEM itemGoDown, HTREEITEM itemGoUp)
|
||||||
removeItem(itemGoDown);
|
removeItem(itemGoDown);
|
||||||
|
|
||||||
// Restore the selection if needed
|
// Restore the selection if needed
|
||||||
if (itemSelected != 0)
|
switch (itemSelected)
|
||||||
{
|
{
|
||||||
if (itemSelected == 1)
|
case 1:
|
||||||
{
|
|
||||||
selectItem(hTreeParent2ndInserted);
|
selectItem(hTreeParent2ndInserted);
|
||||||
}
|
break;
|
||||||
else if (itemSelected == 2)
|
case 2:
|
||||||
{
|
|
||||||
selectItem(hTreeParent1stInserted);
|
selectItem(hTreeParent1stInserted);
|
||||||
}
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue