Skip to content

Commit

Permalink
Fix megalinter CPP warnings (#83)
Browse files Browse the repository at this point in the history
* Fix megalinter CPP warnings

* Increment version
  • Loading branch information
m-ringler authored Nov 25, 2024
1 parent a0224b9 commit ad2dd15
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion czicompress/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cmake_policy(SET CMP0091 NEW) # enable new "MSVC runtime library selection" (htt
# Note that the CMake-variables <Projectname>_VERSION_MAJOR, <Projectname>_VERSION_MINOR, ... are defined by this statement,
# which are used in the build (so that - if changing the name here, change also the usage of those variables).
project ("czicompress"
VERSION 0.5.3)
VERSION 0.5.4)

set(czicompress_VERSION_PATCH_FLAGS "")
set(czicompress_VERSION_TWEAK_FLAGS "")
Expand Down
2 changes: 1 addition & 1 deletion czicompress/capi/capi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class FileProcessor final
total_progress = 95 + 4 + 1 * phase_progress;
}

return progress_report((int32_t)total_progress);
return progress_report(static_cast<int32_t>(total_progress));
});

writer->Close();
Expand Down
4 changes: 4 additions & 0 deletions czicompress/lib/src/commandlineoptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
#include <CZICompress_Config.h>

#include <CLI/CLI.hpp>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>

#include "inc_libCZI.h"

Expand Down
1 change: 1 addition & 0 deletions czicompress/lib/src/consoleio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <cstdarg>
#include <iostream>
#include <limits>
#include <memory>

#if CZICOMPRESS_WIN32_ENVIRONMENT
#include <Windows.h>
Expand Down
2 changes: 2 additions & 0 deletions czicompress/lib/src/copyczi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include "copyczi.h"

#include <limits>
#include <memory>
#include <tuple>
#include <utility>

namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <codecvt>
#include <locale>
#include <string>

namespace utils::utf8
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <include/utils/utf8/utf8converter.h>

#include <stdexcept>
#include <string>

namespace utils::utf8
{
Expand Down
1 change: 1 addition & 0 deletions czicompress/tests/libczi_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <libCZI.h>

#include <algorithm>
#include <memory>

CMemOutputStream::CMemOutputStream(size_t initial_size) : ptr_(nullptr), allocated_size_(initial_size), used_size_(0)
{
Expand Down
1 change: 1 addition & 0 deletions czicompress/tests/test_commandlineparsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <include/commandlineoptions.h>

#include <catch2/catch_test_macros.hpp>
#include <memory>
#include <tuple>
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions czicompress/tests/test_utf8_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <src/copyczi.h>

#include <catch2/catch_test_macros.hpp>
#include <string>

#include "catch2/catch_all.hpp"
#include "libczi_utils.h"
Expand Down

0 comments on commit ad2dd15

Please sign in to comment.