summaryrefslogtreecommitdiffstats
path: root/src/gui/BreadCrumbs.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-07-17 10:52:37 -0400
committerDavid Robillard <d@drobilla.net>2024-07-17 11:47:19 -0400
commite2bbec54b3b26173284754b786310fc7d8589ecc (patch)
tree31e0274e91f9a98d5590d168b6ed733376f65dbb /src/gui/BreadCrumbs.cpp
parentdf04ca05d50928548e5fcd847148cd8c7e843741 (diff)
downloadingen-e2bbec54b3b26173284754b786310fc7d8589ecc.tar.gz
ingen-e2bbec54b3b26173284754b786310fc7d8589ecc.tar.bz2
ingen-e2bbec54b3b26173284754b786310fc7d8589ecc.zip
Use empty() method instead of checking length
Diffstat (limited to 'src/gui/BreadCrumbs.cpp')
-rw-r--r--src/gui/BreadCrumbs.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/BreadCrumbs.cpp b/src/gui/BreadCrumbs.cpp
index 076a259f..eb2d511b 100644
--- a/src/gui/BreadCrumbs.cpp
+++ b/src/gui/BreadCrumbs.cpp
@@ -92,7 +92,7 @@ BreadCrumbs::build(const raul::Path& path,
// Moving to a child of the full path, append crumbs (preserve cache)
string suffix = path.substr(_full_path.length());
- while (suffix.length() > 0) {
+ while (!suffix.empty()) {
if (suffix[0] == '/') {
suffix = suffix.substr(1);
}
@@ -135,7 +135,7 @@ BreadCrumbs::build(const raul::Path& path,
raul::Path working_path("/");
string suffix = path.substr(1);
- while (suffix.length() > 0) {
+ while (!suffix.empty()) {
if (suffix[0] == '/') {
suffix = suffix.substr(1);
}