summaryrefslogtreecommitdiff
path: root/src/memchecker.h
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2016-01-24 22:39:52 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2016-02-09 11:09:51 +0100
commit5fb315261b6f77b383525d6a0fec4b2bde2f074f (patch)
treed62bd59a8b5b7765a5843d96d60f1210824262ed /src/memchecker.h
parente327656409daf5c52fa10ed9138ba45cebeaba13 (diff)
Work in deva's critique. This branch should now be ready for merge.
Diffstat (limited to 'src/memchecker.h')
-rw-r--r--src/memchecker.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/memchecker.h b/src/memchecker.h
index c3e13c2..f12c3d2 100644
--- a/src/memchecker.h
+++ b/src/memchecker.h
@@ -29,20 +29,24 @@
#include "drumkit.h"
#include <string>
+// includes cstdint automatically and is needed for the PRIu64 macro
+#include <cinttypes>
-class Memchecker
+class MemChecker
{
public:
- //! Checks if there is enough memory left to load drumkit into RAM.
- //! \param drumkit The drumkit for which it is checked if there's enough memory left.
- //! \return True iff there is enough memory left.
+ //! Checks if there is enough memory left to load drumkit into RAM.
+ //! \param drumkit The drumkit for which it is checked if there's enough memory left.
+ //! \return True iff there is enough memory left.
bool enoughFreeMemory(const DrumKit& drumkit) const;
protected:
// Computes how much RAM (in bytes) is left.
- size_t calcFreeMemory() const;
+ uint64_t calcFreeMemory() const;
+
// Computes how much memory the drumkit takes when loaded into RAM (in bytes).
- size_t calcNeededMemory(const DrumKit& drumkit) const;
+ uint64_t calcNeededMemory(const DrumKit& drumkit) const;
+
// Computes the number of bytes per channel of <filename> using libsnd.
- size_t calcBytesPerChannel(const std::string& filename) const;
+ uint64_t calcBytesPerChannel(const std::string& filename) const;
};