style(3p/nix/libstore): Additional if/for bracing fixes
This commit is contained in:
parent
af7282536a
commit
83f4c37adf
1 changed files with 11 additions and 7 deletions
18
third_party/nix/src/libstore/derivations.cc
vendored
18
third_party/nix/src/libstore/derivations.cc
vendored
|
@ -226,10 +226,11 @@ string Derivation::unparse() const {
|
||||||
|
|
||||||
bool first = true;
|
bool first = true;
|
||||||
for (auto& i : outputs) {
|
for (auto& i : outputs) {
|
||||||
if (first)
|
if (first) {
|
||||||
first = false;
|
first = false;
|
||||||
else
|
} else {
|
||||||
s += ',';
|
s += ',';
|
||||||
|
}
|
||||||
s += '(';
|
s += '(';
|
||||||
printString(s, i.first);
|
printString(s, i.first);
|
||||||
s += ',';
|
s += ',';
|
||||||
|
@ -244,10 +245,11 @@ string Derivation::unparse() const {
|
||||||
s += "],[";
|
s += "],[";
|
||||||
first = true;
|
first = true;
|
||||||
for (auto& i : inputDrvs) {
|
for (auto& i : inputDrvs) {
|
||||||
if (first)
|
if (first) {
|
||||||
first = false;
|
first = false;
|
||||||
else
|
} else {
|
||||||
s += ',';
|
s += ',';
|
||||||
|
}
|
||||||
s += '(';
|
s += '(';
|
||||||
printString(s, i.first);
|
printString(s, i.first);
|
||||||
s += ',';
|
s += ',';
|
||||||
|
@ -268,10 +270,11 @@ string Derivation::unparse() const {
|
||||||
s += ",[";
|
s += ",[";
|
||||||
first = true;
|
first = true;
|
||||||
for (auto& i : env) {
|
for (auto& i : env) {
|
||||||
if (first)
|
if (first) {
|
||||||
first = false;
|
first = false;
|
||||||
else
|
} else {
|
||||||
s += ',';
|
s += ',';
|
||||||
|
}
|
||||||
s += '(';
|
s += '(';
|
||||||
printString(s, i.first);
|
printString(s, i.first);
|
||||||
s += ',';
|
s += ',';
|
||||||
|
@ -394,8 +397,9 @@ Source& readDerivation(Source& in, Store& store, BasicDerivation& drv) {
|
||||||
|
|
||||||
Sink& operator<<(Sink& out, const BasicDerivation& drv) {
|
Sink& operator<<(Sink& out, const BasicDerivation& drv) {
|
||||||
out << drv.outputs.size();
|
out << drv.outputs.size();
|
||||||
for (auto& i : drv.outputs)
|
for (auto& i : drv.outputs) {
|
||||||
out << i.first << i.second.path << i.second.hashAlgo << i.second.hash;
|
out << i.first << i.second.path << i.second.hashAlgo << i.second.hash;
|
||||||
|
}
|
||||||
out << drv.inputSrcs << drv.platform << drv.builder << drv.args;
|
out << drv.inputSrcs << drv.platform << drv.builder << drv.args;
|
||||||
out << drv.env.size();
|
out << drv.env.size();
|
||||||
for (auto& i : drv.env) {
|
for (auto& i : drv.env) {
|
||||||
|
|
Loading…
Reference in a new issue