mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 08:46:53 +08:00
fix implicit conversion warnings by making them explicit
This commit is contained in:
parent
532f044bd3
commit
14e9ec6e97
@ -57,7 +57,7 @@ namespace chaiscript {
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr std::size_t size() const noexcept {
|
||||
return m_end - m_begin;
|
||||
return std::size_t(m_end - m_begin);
|
||||
}
|
||||
|
||||
[[nodiscard]] std::vector<Boxed_Value> to_vector() const {
|
||||
|
||||
@ -325,7 +325,7 @@ namespace chaiscript
|
||||
|
||||
static std::string_view str(const Position &t_begin, const Position &t_end) noexcept {
|
||||
if (t_begin.m_pos != nullptr && t_end.m_pos != nullptr) {
|
||||
return std::string_view(t_begin.m_pos, std::distance(t_begin.m_pos, t_end.m_pos));
|
||||
return std::string_view(t_begin.m_pos, std::size_t(std::distance(t_begin.m_pos, t_end.m_pos)));
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user