Skip to content

Commit 4810597

Browse files
committed
transcoder<>::partial() is a non-static const member function.
There were three instances where transcoder<>::partial() was a static member function because the function simply returns a constant. However, the transcoder interface has this as a non-static const member function and I think it's important that all of the implementations have exactly the same interface. This change may cause some static analysis warnings, but they can be ignored.
1 parent 83f79d4 commit 4810597

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/icubaby/icubaby.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ template <> class transcoder<char32_t, char8> {
763763
[[nodiscard]] constexpr bool well_formed () const noexcept { return well_formed_; }
764764
/// \returns True if a partial code-point has been passed to operator() and
765765
/// false otherwise.
766-
[[nodiscard]] static constexpr bool partial () noexcept { return false; }
766+
[[nodiscard]] constexpr bool partial () const noexcept { return false; }
767767

768768
private:
769769
/// True if the input consumed is well formed, false otherwise.
@@ -1006,7 +1006,7 @@ template <> class transcoder<char32_t, char16_t> {
10061006
[[nodiscard]] constexpr bool well_formed () const noexcept { return well_formed_; }
10071007
/// \returns True if a partial code-point has been passed to operator() and
10081008
/// false otherwise.
1009-
[[nodiscard]] static constexpr bool partial () noexcept { return false; }
1009+
[[nodiscard]] constexpr bool partial () const noexcept { return false; }
10101010

10111011
private:
10121012
/// True if the input consumed is well formed, false otherwise.
@@ -1978,7 +1978,7 @@ template <> class transcoder<char32_t, char32_t> {
19781978
[[nodiscard]] constexpr bool well_formed () const noexcept { return well_formed_; }
19791979
/// \returns True if a partial code-point has been passed to operator() and
19801980
/// false otherwise.
1981-
[[nodiscard]] static constexpr bool partial () noexcept { return false; }
1981+
[[nodiscard]] constexpr bool partial () const noexcept { return false; }
19821982

19831983
private:
19841984
/// True if the input consumed is well formed, false otherwise.

0 commit comments

Comments
 (0)