From 10756e13cedbe72b79291f52ce8206f5f6d08a47 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sun, 14 Jul 2024 19:47:22 +0200 Subject: [PATCH] small fixes --- solanaceae/ngc_ft1_sha1/chunk_picker.cpp | 4 ++-- solanaceae/ngc_ft1_sha1/chunk_picker_systems.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/solanaceae/ngc_ft1_sha1/chunk_picker.cpp b/solanaceae/ngc_ft1_sha1/chunk_picker.cpp index 9c88b72..27f7c0b 100644 --- a/solanaceae/ngc_ft1_sha1/chunk_picker.cpp +++ b/solanaceae/ngc_ft1_sha1/chunk_picker.cpp @@ -256,7 +256,7 @@ std::vector ChunkPicker::updateChunkRequests( // intersect self have with other have if (!o.all_of()) { - // rare case where no one other has anything + // rare case where no one else has anything continue; } @@ -309,7 +309,7 @@ std::vector ChunkPicker::updateChunkRequests( if (o.all_of()) { const auto byte_offset = o.get().offset_into_file; if (byte_offset <= info.file_size) { - start_offset = o.get().offset_into_file/info.chunk_size; + start_offset = byte_offset/info.chunk_size; } else { // error? } diff --git a/solanaceae/ngc_ft1_sha1/chunk_picker_systems.cpp b/solanaceae/ngc_ft1_sha1/chunk_picker_systems.cpp index 44f44fc..f5ce30e 100644 --- a/solanaceae/ngc_ft1_sha1/chunk_picker_systems.cpp +++ b/solanaceae/ngc_ft1_sha1/chunk_picker_systems.cpp @@ -38,7 +38,7 @@ void chunk_picker_updates( //std::cout << "cput :)\n"; - if (!c.any_of()) { + if (!c.all_of()) { std::cout << "cput uh nuh :(\n"; cp_to_remove.push_back(c); return;