Skip to content

Commit 7f18e26

Browse files
committed
Remove public member token::npos, no longer needed
1 parent 5133c74 commit 7f18e26

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

include/tao/json/pointer.hh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,14 @@ namespace tao
3030
std::string m_key;
3131

3232
public:
33-
static const std::size_t npos = std::string::npos;
34-
3533
explicit token( const std::string & key )
3634
: m_index( internal::token_to_index( key ) ),
3735
m_key( key )
3836
{ }
3937

4038
explicit token( std::string && key )
41-
: m_index( internal::token_to_index( key ) ),
42-
m_key( std::move( key ) )
39+
: m_index( internal::token_to_index( key ) ),
40+
m_key( std::move( key ) )
4341
{ }
4442

4543
token( const token & ) = default;
@@ -63,7 +61,7 @@ namespace tao
6361

6462
std::size_t index() const
6563
{
66-
if ( m_index == npos ) {
64+
if ( m_index == std::string::npos ) {
6765
throw std::invalid_argument( "unable to resolve JSON Pointer, invalid token for array access '" + m_key + '\'' );
6866
}
6967
return m_index;
@@ -229,7 +227,7 @@ namespace tao
229227
}
230228
}
231229
}
232-
return token::npos;
230+
return std::string::npos;
233231
}
234232

235233
inline std::string tokens_to_string( std::vector< token >::const_iterator it, const std::vector< token >::const_iterator & end )

0 commit comments

Comments
 (0)