From 61e21b25576f7f3491f6a837bf59d8b44c6897a0 Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Sun, 17 Mar 2024 19:14:18 -0700 Subject: Delete hasPrefix and hasSuffix from the codebase These now have equivalents in the standard lib in C++20. This change was performed with a custom clang-tidy check which I will submit later. Executed like so: ninja -C build && run-clang-tidy -checks='-*,nix-*' -load=build/libnix-clang-tidy.so -p .. -fix ../tests | tee -a clang-tidy-result Change-Id: I62679e315ff9e7ce72a40b91b79c3e9fc01b27e9 --- src/libstore/builtins/buildenv.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/libstore/builtins/buildenv.cc') diff --git a/src/libstore/builtins/buildenv.cc b/src/libstore/builtins/buildenv.cc index c8911d153..eb68d5a33 100644 --- a/src/libstore/builtins/buildenv.cc +++ b/src/libstore/builtins/buildenv.cc @@ -53,13 +53,13 @@ static void createLinks(State & state, const Path & srcDir, const Path & dstDir, * Python package brings its own * `$out/lib/pythonX.Y/site-packages/easy-install.pth'.) */ - if (hasSuffix(srcFile, "/propagated-build-inputs") || - hasSuffix(srcFile, "/nix-support") || - hasSuffix(srcFile, "/perllocal.pod") || - hasSuffix(srcFile, "/info/dir") || - hasSuffix(srcFile, "/log") || - hasSuffix(srcFile, "/manifest.nix") || - hasSuffix(srcFile, "/manifest.json")) + if (srcFile.ends_with("/propagated-build-inputs") || + srcFile.ends_with("/nix-support") || + srcFile.ends_with("/perllocal.pod") || + srcFile.ends_with("/info/dir") || + srcFile.ends_with("/log") || + srcFile.ends_with("/manifest.nix") || + srcFile.ends_with("/manifest.json")) continue; else if (S_ISDIR(srcSt.st_mode)) { -- cgit v1.2.3