From 2b8e3d16e01e1625cfd29309c25790eb3c57b7d7 Mon Sep 17 00:00:00 2001 From: prascle Date: Thu, 12 Jun 2003 10:43:38 +0000 Subject: [PATCH] PR: g++ 3.2 port --- src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.h | 1 + src/SUPERVGUI/SUPERVGUI_Link.cxx | 8 ++++---- src/SUPERVGUI/SUPERVGUI_Link.h | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.h b/src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.h index e938934..c09cb59 100644 --- a/src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.h +++ b/src/SUPERVGUI/SUPERVGUI_BrowseNodeDlg.h @@ -9,6 +9,7 @@ #ifndef SUPERVGUI_BrowseNodeDlg_H #define SUPERVGUI_BrowseNodeDlg_H +using namespace std; #include #include "SUPERVGUI_Def.h" #include "SUPERVGUI_Port.h" diff --git a/src/SUPERVGUI/SUPERVGUI_Link.cxx b/src/SUPERVGUI/SUPERVGUI_Link.cxx index 0cec3ff..c60c355 100644 --- a/src/SUPERVGUI/SUPERVGUI_Link.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Link.cxx @@ -730,7 +730,7 @@ int distance(int x1, int y1, int x2, int y2) { x = x * x; int y = y2 - y1; y = y * y; - return (int) sqrt(x + y); + return (int) sqrt(double(x + y)); } @@ -755,19 +755,19 @@ int distance(QPoint thePnt, QPoint thePntLn1, QPoint thePntLn2) { r = r * r; s = py - ly; s = s * s; - a = (int) sqrt(r + s); + a = (int) sqrt(double(r + s)); r = px - nx; r = r * r; s = py - ny; s = s * s; - b = (int) sqrt(r + s); + b = (int) sqrt(double(r + s)); r = nx - lx; r = r * r; s = ny - ly; s = s * s; - c = (int) sqrt(r + s); + c = (int) sqrt(double(r + s)); return (a+b-c); } diff --git a/src/SUPERVGUI/SUPERVGUI_Link.h b/src/SUPERVGUI/SUPERVGUI_Link.h index fe79288..f9604ab 100644 --- a/src/SUPERVGUI/SUPERVGUI_Link.h +++ b/src/SUPERVGUI/SUPERVGUI_Link.h @@ -8,6 +8,7 @@ #ifndef SUPERVGUI_Link_H #define SUPERVGUI_Link_H +using namespace std; #include "SUPERVGUI_Def.h" #include "SUPERVGUI_Port.h" #include -- 2.39.2