summaryrefslogtreecommitdiffstats
path: root/dbaccess/source/ui/querydesign/ConnectionLine.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/querydesign/ConnectionLine.cxx')
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLine.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
index 96086d60b682..b22a05424df3 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
@@ -22,6 +22,7 @@
#include <TableWindow.hxx>
#include <TableWindowListBox.hxx>
#include <TableConnection.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
#include <math.h>
#include <osl/diagnose.h>
@@ -121,9 +122,9 @@ namespace
}
}
-OConnectionLine::OConnectionLine( OTableConnection* _pConn, OConnectionLineDataRef const & _pLineData )
+OConnectionLine::OConnectionLine( OTableConnection* _pConn, OConnectionLineDataRef _pLineData )
: m_pTabConn( _pConn )
- , m_pData( _pLineData )
+ , m_pData(std::move( _pLineData ))
{
}
@@ -307,7 +308,7 @@ static double dist_Euklid(const Point &p1, const Point& p2,const Point& pM, Poin
{
Point v(p2 - p1);
Point w(pM - p1);
- double a = sqrt(static_cast<double>(v.X()*v.X() + v.Y()*v.Y()));
+ double a = std::hypot(v.X(), v.Y());
double l = (v.X() * w.Y() - v.Y() * w.X()) / a;
double a2 = w.X()*v.X()+w.Y()*v.Y();
a = a2 / (a * a);