Skip to content

Commit

Permalink
Replace deprecated endswith() with ends_with().
Browse files Browse the repository at this point in the history
  • Loading branch information
veluca93 authored and danakj committed Dec 19, 2023
1 parent d5956d5 commit 82faa37
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions subdoc/lib/visit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,13 @@ class Visitor : public clang::RecursiveASTVisitor<Visitor> {
macro_start - comment_end);

// Drop the #define for this macro.
while (between.endswith(" "))
while (between.ends_with(" "))
between = between.substr(0u, between.size() - 1u);
if (between.endswith("define"))
if (between.ends_with("define"))
between = between.substr(0u, between.size() - strlen("define"));
while (between.endswith(" "))
while (between.ends_with(" "))
between = between.substr(0u, between.size() - 1u);
if (between.endswith("#"))
if (between.ends_with("#"))
between = between.substr(0u, between.size() - strlen("#"));

// There should be no other declarations or macros between the comment and
Expand Down

0 comments on commit 82faa37

Please sign in to comment.