Skip to content
Snippets Groups Projects
Commit a3fe71ba authored by Joscha Schmiedt's avatar Joscha Schmiedt
Browse files

Fix compiler warnings

- _CRT_SECURE_NO_WARNINGS suppresses warnings for "unsafe" fopen, strcpy etc.
- int -> size_t
parent fc8b5caf
No related branches found
No related tags found
2 merge requests!61Release 0.3.0,!58Fix conan create on Windows
Pipeline #56341 failed
...@@ -46,7 +46,9 @@ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) ...@@ -46,7 +46,9 @@ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
IF (WIN32) IF (WIN32)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
ENDIF() add_compile_definitions(_CRT_SECURE_NO_WARNINGS) # suppress warnings for fopen, strcpy, etc.
endif()
IF (BUILD_ACM) IF (BUILD_ACM)
message(STATUS "BUILD_ACM") message(STATUS "BUILD_ACM")
...@@ -370,7 +372,12 @@ endif() ...@@ -370,7 +372,12 @@ endif()
set(liblinkahead_INCLUDE_DEST "include/linkahead") set(liblinkahead_INCLUDE_DEST "include/linkahead")
set(liblinkahead_LIB_DEST "lib") set(liblinkahead_LIB_DEST "lib")
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/.local/") if (WIN32)
set(CMAKE_INSTALL_PREFIX "$ENV{LOCALAPPDATA}/linkahead")
else()
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/.local/")
endif()
install( install(
# targets to install # targets to install
TARGETS linkahead clinkahead caosdb_grpc TARGETS linkahead clinkahead caosdb_grpc
......
...@@ -40,7 +40,7 @@ class ResultSet { ...@@ -40,7 +40,7 @@ class ResultSet {
public: public:
virtual ~ResultSet() = default; virtual ~ResultSet() = default;
[[nodiscard]] virtual auto size() const noexcept -> int = 0; [[nodiscard]] virtual auto size() const noexcept -> size_t = 0;
[[nodiscard]] virtual auto at(const int index) const -> const Entity & = 0; [[nodiscard]] virtual auto at(const int index) const -> const Entity & = 0;
[[nodiscard]] virtual auto mutable_at(int index) const -> Entity * = 0; [[nodiscard]] virtual auto mutable_at(int index) const -> Entity * = 0;
/** /**
...@@ -91,7 +91,7 @@ public: ...@@ -91,7 +91,7 @@ public:
virtual ~AbstractMultiResultSet() = default; virtual ~AbstractMultiResultSet() = default;
inline explicit AbstractMultiResultSet(std::vector<std::unique_ptr<Entity>> result_set) inline explicit AbstractMultiResultSet(std::vector<std::unique_ptr<Entity>> result_set)
: items(std::move(result_set)) {} : items(std::move(result_set)) {}
[[nodiscard]] inline auto size() const noexcept -> int override { return this->items.size(); } [[nodiscard]] inline auto size() const noexcept -> size_t override { return this->items.size(); }
[[nodiscard]] inline auto at(const int index) const -> const Entity & override { [[nodiscard]] inline auto at(const int index) const -> const Entity & override {
return *(this->items.at(index)); return *(this->items.at(index));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment