This is an automated email from the ASF dual-hosted git repository.

bneradt pushed a commit to branch dev-1-2-13
in repository https://gitbox.apache.org/repos/asf/trafficserver-libswoc.git

commit 4499a8d31b0535ab1593bdc30ad5c174149957a8
Author: Alan M. Carroll <[email protected]>
AuthorDate: Fri Nov 13 15:01:12 2020 -0600

    Remove unused code from Unit Parser example.
---
 unit_tests/ex_UnitParser.cc | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/unit_tests/ex_UnitParser.cc b/unit_tests/ex_UnitParser.cc
index 60ab3d1..a05cc12 100644
--- a/unit_tests/ex_UnitParser.cc
+++ b/unit_tests/ex_UnitParser.cc
@@ -24,26 +24,6 @@ template < typename ... Args > Errata Error(TextView const& 
fmt, Args && ... arg
   return Errata{}.note_v(swoc::Severity::ERROR, fmt, 
std::forward_as_tuple(args...));
 }
 
-# if 0
-/** Extract and remove the next token.
- *
- * @tparam PRED Predicate function type - @c bool(char)
- * @param src Input text.
- * @param pred Predicate function.
- * @return The token.
- *
- * The token is the prefix of @a src for which @a pred is true.
- */
-template < typename PRED > inline TextView take_token_if(TextView &src, PRED 
const& pred) {
-  size_t idx = 0;
-  for (auto spot = src.data(), limit = spot + src.size() ; spot < limit && 
pred(*spot); ++spot, ++idx )
-    ; // empty
-  TextView token = src.prefix(idx);
-  src.remove_prefix(idx);
-  return token;
-}
-# endif
-
 } // namespace
 
 /** Parse a string that consists of counts and units.

Reply via email to