Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5cf069b2 authored by Felka Chang's avatar Felka Chang
Browse files

Fix bugprone-use-after-move in ResourceParser

This patch uses reinitialization to solve clang_tidy
bugprone-use-after-move warning in ResourceParser.

The local variables `comment` in functions is used to record comments
in XML. After calling std::move(comment), to use comment.clear() to
reinitialize the value of the variable `comment`.

Reference: https://clang.llvm.org/extra/clang-tidy/checks/\
    bugprone-use-after-move.html

Test: export WITH_TIDY=1 ; \
      rm -rf out/soong/.intermediates/frameworks/base/tools/aapt2* \
      out/host/linux-x86/bin/aapt* \
      out/host/windows-x86/bin/aapt* ;\
      make aapt2

Bug: 150953574
Change-Id: I5658eaedf48e46fb5e7f12a510b83f490f9bc94b
parent 420aed22
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment