From 5e354b92210f8a894ebfb208deff4b945c4290ea Mon Sep 17 00:00:00 2001 From: l0ner Date: Mon, 14 Apr 2014 20:55:00 +0200 Subject: [PATCH] memory.cc - fixed typos and missing headers --- linux/memory.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/linux/memory.cc b/linux/memory.cc index ce37474..6497ccb 100644 --- a/linux/memory.cc +++ b/linux/memory.cc @@ -1,7 +1,9 @@ #include -#include +#include +#include #include "memory.h" +#include "../luts.h" std::string mem_string( bool use_colors = false ) { std::ostringstream oss; @@ -20,7 +22,7 @@ std::string mem_string( bool use_colors = false ) { getline( meminfo_file, mem_line ); substrStart = mem_line.find_first_of( ':' ) + 1; substrLen = mem_line.find_first_of( 'k' ); - total_mem = stoi(mem_line.substr(substrStart, substrLen); + total_mem = stoi(mem_line.substr(substrStart, substrLen)); used_mem = total_mem; @@ -28,7 +30,7 @@ std::string mem_string( bool use_colors = false ) { getline( meminfo_file, mem_line ); substrStart = mem_line.find_first_of( ':' ) + 1; substrLen = mem_line.find_first_of( 'k' ); - unused_mem = stoi(mem_line.substr(substrStart, substrLen); + unused_mem = stoi(mem_line.substr(substrStart, substrLen)); used_mem -= unused_mem; }