From: Tom Lane Date: Sat, 5 Jun 1999 18:05:17 +0000 (+0000) Subject: Remove redeclarations of default parameter values from X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/?a=commitdiff_plain;h=951ddc3716cfbf67c10971f51ff1ae026fd89dce;p=users%2Fbernd%2Fpostgres.git Remove redeclarations of default parameter values from PgDatabase::DisplayTuples and PgDatabase::PrintTuples. This is incorrect according to strict interpretation of the C++ spec, and some compilers will reject it. Also silence g++ warning about unused parameter. --- diff --git a/src/interfaces/libpq++/pgdatabase.cc b/src/interfaces/libpq++/pgdatabase.cc index 8b7857a9d7..132eb5a313 100644 --- a/src/interfaces/libpq++/pgdatabase.cc +++ b/src/interfaces/libpq++/pgdatabase.cc @@ -18,39 +18,39 @@ #include "pgdatabase.h" -void PgDatabase::DisplayTuples(FILE *out = 0, int fillAlign = 1, - const char* fieldSep = "|",int printHeader = 1, int quiet = 0) +void PgDatabase::DisplayTuples(FILE *out, int fillAlign, + const char* fieldSep, int printHeader, + int /* quiet */) { -PQprintOpt po; + PQprintOpt po; - memset(&po,0,sizeof(po)); + memset(&po,0,sizeof(po)); - po.align = (pqbool)fillAlign; - po.fieldSep = (char *)fieldSep; - po.header = (pqbool)printHeader; - - PQprint(out,pgResult,&po); + po.align = (pqbool)fillAlign; + po.fieldSep = (char *)fieldSep; + po.header = (pqbool)printHeader; + PQprint(out,pgResult,&po); } -void PgDatabase::PrintTuples(FILE *out = 0, int printAttName = 1, int terseOutput = 0, int width = 0) +void PgDatabase::PrintTuples(FILE *out, int printAttName, int terseOutput, + int width) { -PQprintOpt po; + PQprintOpt po; - memset(&po,0,sizeof(po)); + memset(&po,0,sizeof(po)); - po.align = (pqbool)width; + po.align = (pqbool)width; - if(terseOutput) po.fieldSep = strdup("|"); - else po.fieldSep = ""; + if(terseOutput) po.fieldSep = strdup("|"); + else po.fieldSep = ""; - po.header = (pqbool)printAttName; - - PQprint(out,pgResult,&po); + po.header = (pqbool)printAttName; + PQprint(out,pgResult,&po); }