]> git.ipfire.org Git - thirdparty/ccache.git/commit
Introduce Counters::get/set/increment methods, replacing operator[]
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 10 Sep 2020 17:17:13 +0000 (19:17 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 14 Sep 2020 17:40:06 +0000 (19:40 +0200)
commitb552f99f4fad10ddc5ff447054ed1ad1b91a17da
tree118797faf4b26bfa3bb3dbecfa88ff6e3abf68b2
parentd83f3ffb9ddde866f217aab838adc25aa184402c
Introduce Counters::get/set/increment methods, replacing operator[]

The primary motivation for this is that it’s now possible to detect and
block underflow when incrementing a value in the unlikely but possible
event that a, say, cache_size_kibibyte is decremented below zero.
src/Counters.cpp
src/Counters.hpp
src/Result.cpp
src/ccache.cpp
src/compress.cpp
src/stats.cpp