From faa1b1f87d4d161cc7fcdc9f32d8abd6fd72316a Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 21 Sep 2015 01:09:34 -0700 Subject: Generally prefer data.empty() to data.size() == 0. --- ldid.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ldid.cpp') diff --git a/ldid.cpp b/ldid.cpp index 102c33b..57737ea 100644 --- 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); -- cgit v1.2.3-56-ge451