Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build_and_test:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-13, macos-14]
os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14, macos-15]
runs-on: ${{ matrix.os }}
env:
EXTRA_CMAKE_FLAGS: -DCMAKE_BUILD_TYPE=Release -DEDUCE_CORE_BUILD_TESTS=ON -DEDUCE_CORE_BUILD_EXAMPLES=ON
Expand Down
7 changes: 4 additions & 3 deletions include/educelab/core/Version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/** @file */

#include <cstdint>
#include <string>

namespace educelab::core
Expand All @@ -16,11 +17,11 @@ struct ProjectInfo {
/** Get the library name and version string */
static auto NameAndVersion() -> std::string;
/** Get the library Major version number */
static auto VersionMajor() -> uint32_t;
static auto VersionMajor() -> std::uint32_t;
/** Get the library Minor version number */
static auto VersionMinor() -> uint32_t;
static auto VersionMinor() -> std::uint32_t;
/** Get the library Patch version number */
static auto VersionPatch() -> uint32_t;
static auto VersionPatch() -> std::uint32_t;
/** Get the git repository URL */
static auto RepositoryURL() -> std::string;
/** Get the full hash for the current git commit */
Expand Down
10 changes: 4 additions & 6 deletions include/educelab/core/types/Uuid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/** @file */

#include <array>
#include <cstdint>
#include <string>
#include <string_view>

Expand Down Expand Up @@ -57,7 +58,7 @@ class Uuid

private:
/** Byte type */
using Byte = uint8_t;
using Byte = std::uint8_t;
/** Byte storage */
std::array<Byte, 16> buffer_{};
};
Expand All @@ -67,15 +68,12 @@ auto operator<<(std::ostream& os, const Uuid& uuid) -> std::ostream&;

} // namespace educelab

namespace std
{
/** @brief Hash function for educelab::Uuid */
template <>
struct hash<educelab::Uuid> {
struct std::hash<educelab::Uuid> {
/** Hash Uuid */
auto operator()(educelab::Uuid const& u) const noexcept -> std::size_t
{
return std::hash<std::string>{}(u.string());
}
};
} // namespace std
}; // namespace std
6 changes: 3 additions & 3 deletions src/Version.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ auto ProjectInfo::Name() -> std::string
return name;
}

auto ProjectInfo::VersionMajor() -> uint32_t
auto ProjectInfo::VersionMajor() -> std::uint32_t
{
static uint32_t vMaj{@PROJECT_VERSION_MAJOR@};
return vMaj;
}

auto ProjectInfo::VersionMinor() -> uint32_t
auto ProjectInfo::VersionMinor() -> std::uint32_t
{
static uint32_t vMin{@PROJECT_VERSION_MINOR@};
return vMin;
}

auto ProjectInfo::VersionPatch() -> uint32_t
auto ProjectInfo::VersionPatch() -> std::uint32_t
{
static uint32_t vPatch{@PROJECT_VERSION_PATCH@};
return vPatch;
Expand Down