From 1de00e6c42ee6beaaa490104888ef09be1d4a0d4 Mon Sep 17 00:00:00 2001 From: Kane York Date: Sat, 1 Aug 2020 17:17:44 -0700 Subject: chore(3p/nix): apply google-readability-casting Command run: jq Reviewed-by: tazjin --- third_party/nix/src/libstore/binary-cache-store.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'third_party/nix/src/libstore/binary-cache-store.cc') diff --git a/third_party/nix/src/libstore/binary-cache-store.cc b/third_party/nix/src/libstore/binary-cache-store.cc index fce4dc0e11..d38db375ed 100644 --- a/third_party/nix/src/libstore/binary-cache-store.cc +++ b/third_party/nix/src/libstore/binary-cache-store.cc @@ -88,7 +88,7 @@ void BinaryCacheStore::getFile(const std::string& path, Sink& sink) { } }}); auto data = promise.get_future().get(); - sink((unsigned char*)data->data(), data->size()); + sink(reinterpret_cast(data->data()), data->size()); } std::shared_ptr BinaryCacheStore::getFile( @@ -206,7 +206,9 @@ void BinaryCacheStore::addToStore(const ValidPathInfo& info, .count(); DLOG(INFO) << "copying path '" << narInfo->path << "' (" << narInfo->narSize << " bytes, compressed " - << ((1.0 - (double)narCompressed->size() / nar->size()) * 100.0) + << ((1.0 - + static_cast(narCompressed->size()) / nar->size()) * + 100.0) << "% in " << duration << "ms) to binary cache"; /* Atomically write the NAR file. */ @@ -288,9 +290,8 @@ void BinaryCacheStore::queryPathInfoUncached( stats.narInfoRead++; - (*callbackPtr)( - (std::shared_ptr)std::make_shared( - *this, *data, narInfoFile)); + (*callbackPtr)(std::shared_ptr( + std::make_shared(*this, *data, narInfoFile))); } catch (...) { callbackPtr->rethrow(); -- cgit 1.4.1