WARNINGS: fix little PVS warnings

This commit is contained in:
BlackMATov
2020-02-19 07:24:43 +07:00
parent ab8b0ea236
commit 1d4cddff18
6 changed files with 25 additions and 24 deletions

View File

@@ -82,7 +82,7 @@ namespace e2d::modules
template < typename... ImplTs >
void shutdown() noexcept {
return (... , module<typename ImplTs::base_type>::shutdown());
(... , module<typename ImplTs::base_type>::shutdown());
}
template < typename... ImplTs >

View File

@@ -6,7 +6,7 @@ pushd $BUILD_DIR/pvs_analyze
rm -rf pvs_report
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=On ../..
pvs-studio-analyzer analyze\
--disableLicenseExpirationCheck\
-e _deps\
-e ../../untests\
-e ../../modules\
-e ../../headers/3rdparty\

View File

@@ -62,9 +62,9 @@ namespace e2d::dbgui_widgets
const str name = str(enum_hpp::to_string_or_throw(level));
const std::size_t index = enum_hpp::to_index_or_throw(level);
bool level_enable = levels_[index];
if ( ImGui::Checkbox(name.c_str(), &level_enable) ) {
levels_[index] = level_enable;
bool level_enabled = levels_.test(index);
if ( ImGui::Checkbox(name.c_str(), &level_enabled) ) {
levels_.set(index, level_enabled);
}
}
});

View File

@@ -477,17 +477,18 @@ namespace e2d
}
engine::~engine() noexcept {
modules::shutdown<dbgui>();
modules::shutdown<render>();
modules::shutdown<window>();
modules::shutdown<network>();
modules::shutdown<audio>();
modules::shutdown<input>();
modules::shutdown<vfs>();
modules::shutdown<debug>();
modules::shutdown<profiler>();
modules::shutdown<deferrer>();
modules::shutdown<platform>();
modules::shutdown<
dbgui,
render,
window,
network,
audio,
input,
vfs,
debug,
profiler,
deferrer,
platform>();
}
bool engine::start(application_uptr app) {

View File

@@ -249,13 +249,14 @@ namespace e2d
starter::~starter() noexcept {
the<luasol>().collect_garbage();
modules::shutdown<editor>();
modules::shutdown<world>();
modules::shutdown<library>();
modules::shutdown<luasol>();
modules::shutdown<inspector>();
modules::shutdown<factory>();
modules::shutdown<engine>();
modules::shutdown<
editor,
world,
library,
luasol,
inspector,
factory,
engine>();
}
bool starter::start(application_uptr app) {

View File

@@ -344,7 +344,6 @@ namespace e2d::fonts::impl
&& font_content.info.atlas_size.y > 0u
&& font_content.info.font_size > 0u
&& font_content.info.line_height > 0u
&& font_content.info.font_size > 0u
&& font_content.info.glyph_ascent > 0u;
bool glyphs_valid = true;