Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite7253d8

Browse files
committed
Remove redeclarations of default parameter values from
PgDatabase::DisplayTuples and PgDatabase::PrintTuples. This is incorrectaccording to strict interpretation of the C++ spec, and some compilerswill reject it. Also silence g++ warning about unused parameter.
1 parent7e6a9a6 commite7253d8

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

‎src/interfaces/libpq++/pgdatabase.cc

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,47 +10,47 @@
1010
* Copyright (c) 1994, Regents of the University of California
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgdatabase.cc,v 1.2 1999/05/30 15:17:57 tgl Exp $
13+
* $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgdatabase.cc,v 1.3 1999/06/05 18:05:17 tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
1717

1818
#include"pgdatabase.h"
1919

2020

21-
voidPgDatabase::DisplayTuples(FILE *out =0,int fillAlign =1,
22-
constchar* fieldSep ="|",int printHeader =1,int quiet =0)
21+
voidPgDatabase::DisplayTuples(FILE *out,int fillAlign,
22+
constchar* fieldSep,int printHeader,
23+
int/* quiet*/)
2324
{
24-
PQprintOpt po;
25+
PQprintOpt po;
2526

26-
memset(&po,0,sizeof(po));
27+
memset(&po,0,sizeof(po));
2728

28-
po.align = (pqbool)fillAlign;
29-
po.fieldSep = (char *)fieldSep;
30-
po.header = (pqbool)printHeader;
31-
32-
PQprint(out,pgResult,&po);
29+
po.align = (pqbool)fillAlign;
30+
po.fieldSep = (char *)fieldSep;
31+
po.header = (pqbool)printHeader;
3332

33+
PQprint(out,pgResult,&po);
3434
}
3535

3636

3737

3838

39-
voidPgDatabase::PrintTuples(FILE *out =0,int printAttName =1,int terseOutput =0,int width =0)
39+
voidPgDatabase::PrintTuples(FILE *out,int printAttName,int terseOutput,
40+
int width)
4041
{
41-
PQprintOpt po;
42+
PQprintOpt po;
4243

43-
memset(&po,0,sizeof(po));
44+
memset(&po,0,sizeof(po));
4445

45-
po.align = (pqbool)width;
46+
po.align = (pqbool)width;
4647

47-
if(terseOutput) po.fieldSep =strdup("|");
48-
else po.fieldSep ="";
48+
if(terseOutput) po.fieldSep =strdup("|");
49+
else po.fieldSep ="";
4950

50-
po.header = (pqbool)printAttName;
51-
52-
PQprint(out,pgResult,&po);
51+
po.header = (pqbool)printAttName;
5352

53+
PQprint(out,pgResult,&po);
5454
}
5555

5656

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp