# HG changeset patch # User Markus Bröker # Date 1239878951 -7200 # Node ID 4a35f239fe5b35f21da14e38b9785486d6402581 # Parent 5e0a954f7c0bb5ff5e16e87595c808e91c1279fd the good, old programming error: * spoon= alloc(data, spoon); * free(spoon); -> there is a spoon (missing) Code indent with my buggy GNU Indent * -> PLEASE GUYS, FIX IT!! committer: Markus Bröker diff --git a/db_bridge/include/abstract_db.h b/db_bridge/include/abstract_db.h --- a/db_bridge/include/abstract_db.h +++ b/db_bridge/include/abstract_db.h @@ -17,7 +17,7 @@ std::string server; public: - typedef std::vector < std::vector >DB_RESULT; + typedef std::vector >DB_RESULT; typedef std::vector DB_ROW; virtual bool connect () = 0; diff --git a/db_bridge/include/mysql_db.h b/db_bridge/include/mysql_db.h --- a/db_bridge/include/mysql_db.h +++ b/db_bridge/include/mysql_db.h @@ -17,9 +17,9 @@ MYSQL_RES *res; public: - MySQL_DB (std::string, std::string, std::string, std::string); - virtual ~ MySQL_DB (); - bool connect (); - Abstract_DB::DB_RESULT query (std::string); + MySQL_DB (std::string, std::string, std::string, std::string); + virtual ~ MySQL_DB (); + bool connect (); + Abstract_DB::DB_RESULT query (std::string); }; #endif diff --git a/db_bridge/include/postgresql_db.h b/db_bridge/include/postgresql_db.h --- a/db_bridge/include/postgresql_db.h +++ b/db_bridge/include/postgresql_db.h @@ -16,12 +16,12 @@ private: PGconn * conn; PGresult *res; - std::string conninfo; + std::string conninfo; public: - PostgreSQL_DB (std::string, std::string, std::string, std::string); - virtual ~ PostgreSQL_DB (); - bool connect (); - Abstract_DB::DB_RESULT query (std::string); + PostgreSQL_DB (std::string, std::string, std::string, std::string); + virtual ~ PostgreSQL_DB (); + bool connect (); + Abstract_DB::DB_RESULT query (std::string); }; #endif diff --git a/libtest/func1.c b/libtest/func1.c --- a/libtest/func1.c +++ b/libtest/func1.c @@ -5,7 +5,7 @@ #include -void func1() +void func1 () { - printf("Func1: Implement me\n"); + printf ("Func1: Implement me\n"); } diff --git a/libtest/func2.c b/libtest/func2.c --- a/libtest/func2.c +++ b/libtest/func2.c @@ -5,7 +5,7 @@ #include -void func2() +void func2 () { - printf("Func2: Implement me\n"); + printf ("Func2: Implement me\n"); } diff --git a/libtest/main.c b/libtest/main.c --- a/libtest/main.c +++ b/libtest/main.c @@ -3,13 +3,13 @@ * Copyright (C) 2008 Markus Broeker */ -void func1(); -void func2(); +void func1 (); +void func2 (); -int main(int argc, char **argv) +int main (int argc, char **argv) { - func1(); - func2(); + func1 (); + func2 (); - return 0; + return 0; } diff --git a/pmc/cube.cc b/pmc/cube.cc --- a/pmc/cube.cc +++ b/pmc/cube.cc @@ -32,8 +32,12 @@ void Cube::move (Vector location) { + Vector *p_tmp; + for (int i = 0; i < 8; i++) { - P[i] = new Vector (*P[i] + location); + p_tmp = new Vector (*P[i] + location); + delete P[i]; + P[i] = p_tmp; } } diff --git a/pmc/include/cube.h b/pmc/include/cube.h --- a/pmc/include/cube.h +++ b/pmc/include/cube.h @@ -15,10 +15,9 @@ Vector * P[8]; int height; - Cube (Vector p1, Vector p2, Vector p3, Vector p4, int h); - virtual ~ Cube (); + Cube (Vector p1, Vector p2, Vector p3, Vector p4, int h); + virtual ~ Cube (); void show (); void move (Vector); }; - #endif diff --git a/pmc/include/object.h b/pmc/include/object.h --- a/pmc/include/object.h +++ b/pmc/include/object.h @@ -15,7 +15,7 @@ public: virtual ~ Object () { - std::cout << "Freeing Object " << name << std::endl; - } + std::cout << "Freeing Object " << name << std::endl; + }; }; #endif diff --git a/pmc/include/pmc.h b/pmc/include/pmc.h --- a/pmc/include/pmc.h +++ b/pmc/include/pmc.h @@ -19,8 +19,8 @@ public: enum Mode { DEG, RAD, GRAD }; - Vector (int xx = 0, int yy = 0, int zz = 0); - virtual ~ Vector (); + Vector (int xx = 0, int yy = 0, int zz = 0); + virtual ~ Vector (); int X (); int Y ();