From 7d2b10d4b64846f79a145b1cfd225875fdd1cca4 Mon Sep 17 00:00:00 2001 From: Michalis Toutoudakis Date: Wed, 17 Jul 2024 17:47:47 +0300 Subject: [PATCH] [refactor] Explain what +8 does to get the path after default/ --- src/dummy_daos/parallax.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dummy_daos/parallax.cc b/src/dummy_daos/parallax.cc index 1e86f91c5..b312b7c77 100644 --- a/src/dummy_daos/parallax.cc +++ b/src/dummy_daos/parallax.cc @@ -170,7 +170,8 @@ std::string get_path_after_default(const std::string &fullPath) { // Find the position of "default/" size_t pos = fullPath.find("default/"); - return fullPath.substr(pos + 8); // +8 to skip "default/" + // +8 to skip "default/ because default/ has 8 characters" + return fullPath.substr(pos + 8); } std::string get_path_after_last_slash(const std::string &fullPath) {