]> git.saurik.com Git - ldid.git/commitdiff
Generally prefer data.empty() to data.size() == 0.
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 21 Sep 2015 08:09:34 +0000 (01:09 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 21 Sep 2015 08:09:34 +0000 (01:09 -0700)
ldid.cpp

index 102c33b6710c1aba48772f8991f647d630cd0095..57737eaf49aac0940d5201b63686c2e4bb00b0dc 100644 (file)
--- a/ldid.cpp
+++ b/ldid.cpp
@@ -1182,7 +1182,7 @@ void resign(void *idata, size_t isize, std::streambuf &output, const std::string
         alloc += sizeof(struct BlobIndex);
         alloc += 0xc;
 
-        if (entitlements.size() != 0) {
+        if (!entitlements.empty()) {
             special = std::max(special, CSSLOT_ENTITLEMENTS);
             alloc += sizeof(struct BlobIndex);
             alloc += sizeof(struct Blob);
@@ -1210,7 +1210,7 @@ void resign(void *idata, size_t isize, std::streambuf &output, const std::string
             insert(blobs, CSSLOT_REQUIREMENTS, data);
         }
 
-        if (entitlements.size() != 0) {
+        if (!entitlements.empty()) {
             std::stringbuf data;
             put(data, entitlements.data(), entitlements.size());
             insert(blobs, CSSLOT_ENTITLEMENTS, CSMAGIC_EMBEDDED_ENTITLEMENTS, data);