Skip to content

Commit

Permalink
fix aarch64 build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed Oct 6, 2024
1 parent 3beec34 commit 4725e01
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ jobs:
distro: ubuntu22.04
install: |
apt-get update -q -y
apt-get install -y cmake make g++ ninja-build git
apt-get install -y cmake make g++ ninja-build git gcc-12
ln -s -f /usr/bin/gcc-12 /usr/bin/gcc
run: |
cmake -DCMAKE_CXX_STANDARD=20 -B build
cmake --build build
Expand Down
4 changes: 2 additions & 2 deletions include/ada/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ bool overlaps(std::string_view input1, const std::string& input2) noexcept;
* Return the substring from input going from index pos1 to the pos2 (non
* included). The length of the substring is pos2 - pos1.
*/
ada_really_inline constexpr std::string_view substring(const std::string& input,
ada_really_inline constexpr std::string_view substring(std::string_view input,
size_t pos1,
size_t pos2) noexcept {
#if ADA_DEVELOPMENT_CHECKS
Expand All @@ -112,7 +112,7 @@ ada_really_inline constexpr std::string_view substring(const std::string& input,
abort();
}
#endif
return std::string_view(input.data() + pos1, pos2 - pos1);
return input.substr(pos1, pos2 - pos1);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion include/ada/url-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include <optional>
#include <string>
#include <string_view>
#if ADA_REGULAR_VISUAL_STUDIO
#include <intrin.h>
#endif // ADA_REGULAR_VISUAL_STUDIO
Expand Down Expand Up @@ -44,7 +45,7 @@ inline std::ostream &operator<<(std::ostream &out, const ada::url &u) {
}

[[nodiscard]] constexpr std::string_view url::get_pathname() const noexcept {
return path;
return std::string_view(path);
}

[[nodiscard]] ada_really_inline ada::url_components url::get_components()
Expand Down

0 comments on commit 4725e01

Please sign in to comment.