1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-17 07:52:43 +01:00

Use data() instead of c_str() where appropriate

This commit is contained in:
Eelco Dolstra 2012-02-09 18:27:45 +01:00
parent ec2827f5fc
commit d5a5a83ad4
9 changed files with 18 additions and 18 deletions

View file

@ -509,7 +509,7 @@ void RemoteStore::processStderr(Sink * sink, Source * source)
if (msg == STDERR_WRITE) {
string s = readString(from);
if (!sink) throw Error("no sink");
(*sink)((const unsigned char *) s.c_str(), s.size());
(*sink)((const unsigned char *) s.data(), s.size());
}
else if (msg == STDERR_READ) {
if (!source) throw Error("no source");
@ -521,7 +521,7 @@ void RemoteStore::processStderr(Sink * sink, Source * source)
}
else {
string s = readString(from);
writeToStderr((const unsigned char *) s.c_str(), s.size());
writeToStderr((const unsigned char *) s.data(), s.size());
}
}
if (msg == STDERR_ERROR) {