From dbbc8e9105d6fc1c22baca606836ff8f2db2e1d9 Mon Sep 17 00:00:00 2001 From: Daniel Knittl-Frank Date: Mon, 4 Oct 2010 20:53:57 +0200 Subject: [PATCH] Small fixes --- C/Layout.cpp | 4 ++-- C/Makefile | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/C/Layout.cpp b/C/Layout.cpp index 800ce41..4be660b 100644 --- a/C/Layout.cpp +++ b/C/Layout.cpp @@ -13,7 +13,7 @@ public: typedef vector::reverse_iterator reverse_iterator; Layout(const std::string &s = "") { - this->layout.reserve(11*3+4); // 11 chars per row average + newlines + this->layout.reserve(12+11+10); // 33 keys this->layout.clear(); this->add(s); @@ -64,7 +64,7 @@ public: s.append(string(1, *it)); } s.append(" "); - for(end = it+5; it != end; ++it) { + for(end = this->layout.end(); it != end; ++it) { s.append(string(1, *it)); } return s; diff --git a/C/Makefile b/C/Makefile index 2e4f90c..eabc819 100644 --- a/C/Makefile +++ b/C/Makefile @@ -3,12 +3,13 @@ FLAGS=-Wall INC=-I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include LIB=-lglibmm-2.4 -create_dummy_file: create_dummy_file.cpp +all: recheck_layouts + +create_dummy_file: create_dummy_file.cpp Layout.cpp $(CC) $(FLAGS) $(INC) $(LIB) $< -o $@ recheck_layouts: recheck_layouts.cpp File.cpp Layout.cpp - g++ -Wall $< -o $@ + $(CC) $(FLAGS) $(INC) $(LIB) $< -o $@ -all: recheck_all_result_layouts .PHONY: all -- 2.11.4.GIT