aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/nar-info.cc
diff options
context:
space:
mode:
authorCarlo Nucera <carlo.nucera@protonmail.com>2020-08-05 15:30:38 -0400
committerCarlo Nucera <carlo.nucera@protonmail.com>2020-08-05 15:30:38 -0400
commit8241e660bac5583d2924a490e5b32027e9e8e2fc (patch)
tree839240a56ac0f5f8ac916e5df322df583b0e340e /src/libstore/nar-info.cc
parentbe6e1c645707cd91d160bcfbedb9cd23cf24780d (diff)
Remove Hash::operator bool ()
Since the hash is not optional anymore
Diffstat (limited to 'src/libstore/nar-info.cc')
-rw-r--r--src/libstore/nar-info.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/nar-info.cc b/src/libstore/nar-info.cc
index cadaf6267..3a9121679 100644
--- a/src/libstore/nar-info.cc
+++ b/src/libstore/nar-info.cc
@@ -76,7 +76,7 @@ NarInfo::NarInfo(const Store & store, const std::string & s, const std::string &
if (compression == "") compression = "bzip2";
- if (!havePath || url.empty() || narSize == 0 || !narHash) throw corrupt();
+ if (!havePath || url.empty() || narSize == 0) throw corrupt();
}
std::string NarInfo::to_string(const Store & store) const
@@ -89,7 +89,7 @@ std::string NarInfo::to_string(const Store & store) const
assert(fileHash && fileHash->type == htSHA256);
res += "FileHash: " + fileHash->to_string(Base32, true) + "\n";
res += "FileSize: " + std::to_string(fileSize) + "\n";
- assert(narHash && narHash.type == htSHA256);
+ assert(narHash.type == htSHA256);
res += "NarHash: " + narHash.to_string(Base32, true) + "\n";
res += "NarSize: " + std::to_string(narSize) + "\n";