Skip to content

Commit

Permalink
Use standard "||" instead of "or" keyword in Firebird backend code.
Browse files Browse the repository at this point in the history
MSVC doesn't support the use keywords for logical operators without including
<iso646.h> first. Instead of doing this and possibly running into more
problems on other systems, just use the standard C operators.
  • Loading branch information
vadz authored and mloskot committed Mar 24, 2013
1 parent 3bbd5c2 commit feb4ae7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/backends/firebird/common.cpp
Expand Up @@ -32,8 +32,8 @@ char * allocBuffer(XSQLVAR* var)
{
size = var->sqllen + sizeof(short);
}
else if (type == SQL_TIMESTAMP or type == SQL_TYPE_TIME
or type == SQL_TYPE_DATE)
else if (type == SQL_TIMESTAMP || type == SQL_TYPE_TIME
|| type == SQL_TYPE_DATE)
{
size = sizeof(std::tm);
}
Expand Down Expand Up @@ -127,7 +127,7 @@ void setTextParam(char const * s, std::size_t size, char * buf_,
parse_decimal<long long, unsigned long long>(buf_, var, s);
}
else if ((var->sqltype & ~1) == SQL_TIMESTAMP
or (var->sqltype & ~1) == SQL_TYPE_DATE)
|| (var->sqltype & ~1) == SQL_TYPE_DATE)
{
unsigned short year, month, day, hour, min, sec;
if (std::sscanf(s, "%hu-%hu-%hu %hu:%hu:%hu",
Expand Down
2 changes: 1 addition & 1 deletion src/backends/firebird/session.cpp
Expand Up @@ -245,7 +245,7 @@ firebird_session_backend::firebird_session_backend(

if (getISCConnectParameter(params, "decimals_as_strings", param))
{
decimals_as_strings_ = param == "1" or param == "Y" or param == "y";
decimals_as_strings_ = param == "1" || param == "Y" || param == "y";
}
// starting transaction
begin();
Expand Down

0 comments on commit feb4ae7

Please sign in to comment.