From 888e74c12a2730f5b60e8cfcb3c9a0c1870d0c4a Mon Sep 17 00:00:00 2001
From: Joachim Metz <joachim.metz@gmail.com>
Date: Wed, 1 Dec 2021 06:31:15 +0100
Subject: [PATCH] Replaced instances of string.size() with string.empty()

---
 tsk/pool/apfs_pool_compat.cpp | 2 +-
 tsk/pool/tsk_pool.hpp         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tsk/pool/apfs_pool_compat.cpp b/tsk/pool/apfs_pool_compat.cpp
index a77cef65f..2b1d16aca 100755
--- a/tsk/pool/apfs_pool_compat.cpp
+++ b/tsk/pool/apfs_pool_compat.cpp
@@ -185,7 +185,7 @@ uint8_t APFSPoolCompat::poolstat(FILE *hFile) const noexcept try {
                                    vol.changed() % 1000000000, time_buf));
 
     const auto unmount_log = vol.unmount_log();
-    if (unmount_log.size() != 0) {
+    if (!unmount_log.empty()) {
       tsk_fprintf(hFile, "|\n");
       tsk_fprintf(hFile, "|   Unmount Logs\n");
       tsk_fprintf(hFile, "|   ------------\n");
diff --git a/tsk/pool/tsk_pool.hpp b/tsk/pool/tsk_pool.hpp
index 059865415..7380e0677 100644
--- a/tsk/pool/tsk_pool.hpp
+++ b/tsk/pool/tsk_pool.hpp
@@ -44,7 +44,7 @@ class TSKPool {
   inline uint32_t dev_block_size() const noexcept { return _dev_block_size; }
   inline uint64_t num_blocks() const noexcept { return _num_blocks; }
   inline uint64_t first_img_offset() const noexcept {
-      if (_members.size() >= 1) {
+      if (!_members.empty()) {
           return _members[0].second;
       }
       return 0;
-- 
GitLab