Skip to content

Commit

Permalink
Small fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinH committed Dec 9, 2024
1 parent a536416 commit 94786f2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/example/pegtl/coverage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ namespace coverage
assert( !in.empty() );
std::size_t t = 0;
const bool b = pegtl::internal::convert_unsigned( t, in.string_view() );
(void)b;
assert( b );
assert( t > 0 );
st.number = t - 1;
Expand All @@ -157,6 +158,7 @@ namespace coverage
if( !in.empty() ) {
std::size_t t = 0;
const bool b = pegtl::internal::convert_unsigned( t, in.string_view() );
(void)b;
assert( b );
st.count = t;
st.non_zero_count += std::size_t( t > 0 );
Expand Down
2 changes: 1 addition & 1 deletion src/example/pegtl/token_input_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ struct my_grammar
int main()
{
const std::vector< my_token > v{
{ my_type::beta, "first" },
{ my_type::beta, "first" },
{ my_type::beta, "second" }
};
token_input< my_token > in( v );
Expand Down
2 changes: 1 addition & 1 deletion src/example/pegtl/token_input_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ struct my_grammar
int main()
{
const std::vector< my_token > v{
{ my_type::beta, "first" },
{ my_type::beta, "first" },
{ my_type::beta, "second" }
};
token_input in( v );
Expand Down
1 change: 0 additions & 1 deletion src/test/pegtl/internal_resize_uninitialized.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace TAO_PEGTL_NAMESPACE
{
std::string s1;
TAO_PEGTL_TEST_ASSERT( s1.size() == 0 );
TAO_PEGTL_TEST_ASSERT( s1.capacity() >= 0 );
internal::resize_uninitialized( s1, 100 );
TAO_PEGTL_TEST_ASSERT( s1.size() == 100 );
TAO_PEGTL_TEST_ASSERT( s1.capacity() >= 100 );
Expand Down

0 comments on commit 94786f2

Please sign in to comment.