From 39087321811e81e26a1a47d6967df1088dcf0e95 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 19 May 2020 20:47:23 +0100 Subject: style(3p/nix): Final act in the brace-wrapping saga This last change set was generated by a full clang-tidy run (including compilation): clang-tidy -p ~/projects/nix-build/ \ -checks=-*,readability-braces-around-statements -fix src/*/*.cc Actually running clang-tidy requires some massaging to make it play nice with Nix + meson, I'll be adding a wrapper or something for that soon. --- third_party/nix/src/libstore/nar-info-disk-cache.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'third_party/nix/src/libstore/nar-info-disk-cache.cc') diff --git a/third_party/nix/src/libstore/nar-info-disk-cache.cc b/third_party/nix/src/libstore/nar-info-disk-cache.cc index 6d9aeb129d..3adda508d0 100644 --- a/third_party/nix/src/libstore/nar-info-disk-cache.cc +++ b/third_party/nix/src/libstore/nar-info-disk-cache.cc @@ -76,8 +76,9 @@ class NarInfoDiskCacheImpl : public NarInfoDiskCache { state->db = SQLite(dbPath); - if (sqlite3_busy_timeout(state->db, 60 * 60 * 1000) != SQLITE_OK) + if (sqlite3_busy_timeout(state->db, 60 * 60 * 1000) != SQLITE_OK) { throwSQLiteError(state->db, "setting timeout"); + } // We can always reproduce the cache. state->db.exec("pragma synchronous = off"); @@ -224,12 +225,15 @@ class NarInfoDiskCacheImpl : public NarInfoDiskCache { narInfo->fileSize = queryNAR.getInt(5); narInfo->narHash = Hash(queryNAR.getStr(6)); narInfo->narSize = queryNAR.getInt(7); - for (auto& r : tokenizeString(queryNAR.getStr(8), " ")) + for (auto& r : tokenizeString(queryNAR.getStr(8), " ")) { narInfo->references.insert(cache.storeDir + "/" + r); - if (!queryNAR.isNull(9)) + } + if (!queryNAR.isNull(9)) { narInfo->deriver = cache.storeDir + "/" + queryNAR.getStr(9); - for (auto& sig : tokenizeString(queryNAR.getStr(10), " ")) + } + for (auto& sig : tokenizeString(queryNAR.getStr(10), " ")) { narInfo->sigs.insert(sig); + } narInfo->ca = queryNAR.getStr(11); return {oValid, narInfo}; -- cgit 1.4.1