diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-11-12 22:24:12 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-11-19 22:34:01 +0100 |
| commit | c46f6125c482f2a3361cd33d1e1163927f038e9d (patch) | |
| tree | 8b905cb411c395e617ba2c6d583497e1f4f43dea /src/util.cc | |
| parent | e3fa86ef35f212b14b593dd36dbff66e845d37e4 (diff) | |
Report progress with done/total rather than a float.
Diffstat (limited to 'src/util.cc')
| -rw-r--r-- | src/util.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.cc b/src/util.cc index 1ff36f59..a030ecb0 100644 --- a/src/util.cc +++ b/src/util.cc @@ -117,7 +117,7 @@ dcp::make_digest (ArrayData data) string -dcp::make_digest (boost::filesystem::path filename, function<void (float)> progress) +dcp::make_digest(boost::filesystem::path filename, function<void (int64_t, int64_t)> progress) { Kumu::FileReader reader; auto r = reader.OpenRead(dcp::filesystem::fix_long_path(filename).string().c_str()); @@ -146,7 +146,7 @@ dcp::make_digest (boost::filesystem::path filename, function<void (float)> progr SHA1_Update (&sha, read_buffer.Data(), read); if (progress) { - progress (float (done) / size); + progress(done, size); done += read; } } |
