mirror of
https://github.com/osm2pgsql-dev/osm2pgsql.git
synced 2025-08-20 13:20:40 +00:00
explicit type conversions to reduce MSVC warnings
This commit is contained in:
@ -63,7 +63,7 @@ private:
|
||||
int _lon;
|
||||
int _lat;
|
||||
|
||||
int dbl2fix(const double x) const { return x * scale + 0.4; }
|
||||
int dbl2fix(const double x) const { return (int) (x * scale + 0.4); }
|
||||
double fix2dbl(const int x) const { return (double)x / scale; }
|
||||
#else
|
||||
public:
|
||||
|
@ -25,10 +25,10 @@ void escape(const std::string &src, std::string& dst);
|
||||
|
||||
|
||||
inline void pgsql_CopyData(const char *context, PGconn *sql_conn, const char *sql) {
|
||||
pgsql_CopyData(context, sql_conn, sql, strlen(sql));
|
||||
pgsql_CopyData(context, sql_conn, sql, (int) strlen(sql));
|
||||
}
|
||||
|
||||
inline void pgsql_CopyData(const char *context, PGconn *sql_conn, const std::string &sql) {
|
||||
pgsql_CopyData(context, sql_conn, sql.c_str(), sql.length());
|
||||
pgsql_CopyData(context, sql_conn, sql.c_str(), (int) sql.length());
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user