diff --git a/Demos/Demo_ItemBox/ResourceItemInfo.cpp b/Demos/Demo_ItemBox/ResourceItemInfo.cpp index 82d5fd46e1..5d2500d15f 100644 --- a/Demos/Demo_ItemBox/ResourceItemInfo.cpp +++ b/Demos/Demo_ItemBox/ResourceItemInfo.cpp @@ -38,7 +38,6 @@ namespace demo const std::string& ResourceItemInfo::getItemResourceImage() { - //TODO: cppcheck return mItemResourceImage; } diff --git a/MyGUIEngine/src/MyGUI_EditBox.cpp b/MyGUIEngine/src/MyGUI_EditBox.cpp index c9a6a1ee21..ff5ae4f7d7 100644 --- a/MyGUIEngine/src/MyGUI_EditBox.cpp +++ b/MyGUIEngine/src/MyGUI_EditBox.cpp @@ -1020,7 +1020,6 @@ namespace MyGUI // возвращает текст UString EditBox::getTextInterval(size_t _start, size_t _count) { - //TODO: cppcheck // подстраховка if (_start > mTextLength) _start = mTextLength; // конец диапазона diff --git a/MyGUIEngine/src/MyGUI_MenuControl.cpp b/MyGUIEngine/src/MyGUI_MenuControl.cpp index 1346186c20..59bd5a0184 100644 --- a/MyGUIEngine/src/MyGUI_MenuControl.cpp +++ b/MyGUIEngine/src/MyGUI_MenuControl.cpp @@ -367,7 +367,6 @@ namespace MyGUI MenuControl* menu = mItemsInfo[_index].submenu; - // TODO: duplicate code if (mVerticalAlignment) { // too wide diff --git a/Platforms/DirectX/DirectXPlatform/src/MyGUI_DirectXRenderManager.cpp b/Platforms/DirectX/DirectXPlatform/src/MyGUI_DirectXRenderManager.cpp index e2f9c3d6e3..65bbaf9669 100644 --- a/Platforms/DirectX/DirectXPlatform/src/MyGUI_DirectXRenderManager.cpp +++ b/Platforms/DirectX/DirectXPlatform/src/MyGUI_DirectXRenderManager.cpp @@ -43,7 +43,7 @@ namespace MyGUI D3DCAPS9 caps; mpD3DDevice->GetDeviceCaps(&caps); - if(caps.TextureCaps & D3DPTEXTURECAPS_SQUAREONLY) + if (caps.TextureCaps & D3DPTEXTURECAPS_SQUAREONLY) { MYGUI_PLATFORM_LOG(Warning, "Non-squared textures not supported."); } diff --git a/Scripts/cppcheck/cppcheck.py b/Scripts/cppcheck/cppcheck.py index 445f12bc0d..e84c3ae578 100644 --- a/Scripts/cppcheck/cppcheck.py +++ b/Scripts/cppcheck/cppcheck.py @@ -48,5 +48,5 @@ def checkFolderSources(folder, flags) : checkFolderSources('Platforms/Ogre/OgrePlatform/src', '-I Platforms/Ogre/OgrePlatform/include') checkFolderSources('Platforms/DirectX/DirectXPlatform/src', '-I Platforms/DirectX/DirectXPlatform/include') checkFolderSources('Plugins', '') -checkFolderSources('Wrappers', '') +checkFolderSources('Wrappers/WrapperGenerator', '') diff --git a/Tools/SkinEditor/SettingsSector.cpp b/Tools/SkinEditor/SettingsSector.cpp index 65e6293e4d..54da0a21f9 100644 --- a/Tools/SkinEditor/SettingsSector.cpp +++ b/Tools/SkinEditor/SettingsSector.cpp @@ -59,14 +59,12 @@ namespace tools bool SettingsSector::getExistProperty(const MyGUI::UString& _propertyName) { - // TODO CPPCHECK MapUString::const_iterator item = mProperties.find(_propertyName); return item != mProperties.end(); } const MyGUI::UString& SettingsSector::getPropertyValue(const MyGUI::UString& _propertyName) { - // TODO CPPCHECK MapUString::const_iterator item = mProperties.find(_propertyName); if (item != mProperties.end()) return (*item).second; diff --git a/Wrappers/WrapperGenerator/MemberFunction.h b/Wrappers/WrapperGenerator/MemberFunction.h index 90d3628dee..903bc7eab6 100644 --- a/Wrappers/WrapperGenerator/MemberFunction.h +++ b/Wrappers/WrapperGenerator/MemberFunction.h @@ -245,7 +245,7 @@ namespace wrapper mNeedPrint = _value; } - bool isNeedInsert() + bool isNeedInsert() const { if ( !mNeedPrint || diff --git a/Wrappers/WrapperGenerator/MemberVariable.h b/Wrappers/WrapperGenerator/MemberVariable.h index 6285a119d4..964e44d802 100644 --- a/Wrappers/WrapperGenerator/MemberVariable.h +++ b/Wrappers/WrapperGenerator/MemberVariable.h @@ -108,7 +108,7 @@ namespace wrapper private: - bool isNeedInsert() + bool isNeedInsert() const { return ! mProtection; }