Unify ProgressCallbacks to a Common::ProgressCallback

This commit is contained in:
Pengfei
2021-06-28 22:50:16 +08:00
parent 5a4bf7daff
commit 2575e7fdde
15 changed files with 69 additions and 46 deletions
+1
View File
@@ -10,6 +10,7 @@ add_library(common STATIC
logging/log.cpp
logging/log.h
misc.cpp
progress_callback.h
scope_exit.h
string_util.cpp
string_util.h
+14
View File
@@ -0,0 +1,14 @@
// Copyright 2021 threeSD Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#pragma once
#include <functional>
namespace Common {
// (current_size, total_size)
using ProgressCallback = std::function<void(std::size_t, std::size_t)>;
} // namespace Common