mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 15:32:43 +01:00
Fix consts and casts
This commit is contained in:
parent
c581143e0c
commit
df8bfe84cc
6 changed files with 14 additions and 14 deletions
|
|
@ -38,12 +38,12 @@ NarInfo::NarInfo(const Store & store, const std::string & s, const std::string &
|
|||
while (pos < s.size()) {
|
||||
|
||||
size_t colon = s.find(':', pos);
|
||||
if (colon == std::string::npos) throw corrupt("expecting ':'");
|
||||
if (colon == s.npos) throw corrupt("expecting ':'");
|
||||
|
||||
std::string name(s, pos, colon - pos);
|
||||
|
||||
size_t eol = s.find('\n', colon + 2);
|
||||
if (eol == std::string::npos) throw corrupt("expecting '\\n'");
|
||||
if (eol == s.npos) throw corrupt("expecting '\\n'");
|
||||
|
||||
std::string value(s, colon + 2, eol - colon - 2);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue