diff options
author | bd <bdunahu@operationnull.com> | 2025-04-26 16:38:07 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-04-26 16:38:07 -0400 |
commit | d449750f789076459de8d47c2960a1279e543c32 (patch) | |
tree | 7e2f5fd8f6f0ba267b7855ee4bb4bd181255c393 /gui/util.cc | |
parent | 6382d595cf947eb54249ff5fea20d8eb073ef3c1 (diff) |
Fix some issues in GUI looking for memory leak
Diffstat (limited to 'gui/util.cc')
-rw-r--r-- | gui/util.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gui/util.cc b/gui/util.cc index 72c0d87..21bf0be 100644 --- a/gui/util.cc +++ b/gui/util.cc @@ -1,16 +1,17 @@ #include "util.h" +#include "definitions.h" #include <QString> int cache_size_mapper(int total_levels, int level) { const int y_min = 4; - const int y_max = 12; + const int y_max = MEM_LINES - 2; double f, r; if (total_levels <= 1) return 8; - f = level / total_levels; + f = level / (double)total_levels; r = y_min + f * (y_max - y_min); return r; |