From 6cb3c5ee020a1ee97aac43513220ac5ffec4b4d6 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 26 Jun 2021 11:59:04 -0700 Subject: [PATCH] remove unused Rectangle {x|y}Border --- lib/vpsc/CMakeLists.txt | 1 - lib/vpsc/Makefile.am | 2 +- lib/vpsc/generate-constraints.h | 11 +++----- lib/vpsc/remove_rectangle_overlap.cpp | 37 --------------------------- lib/vpsc/vpsc.vcxproj | 1 - lib/vpsc/vpsc.vcxproj.filters | 3 --- 6 files changed, 5 insertions(+), 50 deletions(-) delete mode 100644 lib/vpsc/remove_rectangle_overlap.cpp diff --git a/lib/vpsc/CMakeLists.txt b/lib/vpsc/CMakeLists.txt index 5cdea446a..5fb917bca 100644 --- a/lib/vpsc/CMakeLists.txt +++ b/lib/vpsc/CMakeLists.txt @@ -19,7 +19,6 @@ add_library(vpsc STATIC csolve_VPSC.cpp generate-constraints.cpp pairingheap/PairingHeap.cpp - remove_rectangle_overlap.cpp solve_VPSC.cpp variable.cpp ) diff --git a/lib/vpsc/Makefile.am b/lib/vpsc/Makefile.am index 92ab2559c..f00b70604 100644 --- a/lib/vpsc/Makefile.am +++ b/lib/vpsc/Makefile.am @@ -14,7 +14,7 @@ noinst_HEADERS = \ libvpsc_C_la_SOURCES = \ block.cpp blocks.cpp constraint.cpp generate-constraints.cpp \ - pairingheap/PairingHeap.cpp remove_rectangle_overlap.cpp \ + pairingheap/PairingHeap.cpp \ solve_VPSC.cpp csolve_VPSC.cpp variable.cpp EXTRA_DIST = vpsc.vcxproj* diff --git a/lib/vpsc/generate-constraints.h b/lib/vpsc/generate-constraints.h index 0b326c4bb..fef98a206 100644 --- a/lib/vpsc/generate-constraints.h +++ b/lib/vpsc/generate-constraints.h @@ -22,10 +22,9 @@ class Rectangle { friend std::ostream& operator <<(std::ostream &os, const Rectangle &r); public: - static double xBorder,yBorder; Rectangle(double x, double X, double y, double Y); - double getMaxX() const { return maxX+xBorder; } - double getMaxY() const { return maxY+yBorder; } + double getMaxX() const { return maxX; } + double getMaxY() const { return maxY; } double getMinX() const { return minX; } double getMinY() const { return minY; } double getMinD(unsigned const d) const { @@ -38,8 +37,6 @@ public: double getCentreY() const { return minY+height()/2.0; } double width() const { return getMaxX()-minX; } double height() const { return getMaxY()-minY; } - static void setXBorder(double x) {xBorder=x;} - static void setYBorder(double y) {yBorder=y;} void moveCentreX(double x) { moveMinX(x-width()/2.0); } @@ -47,11 +44,11 @@ public: moveMinY(y-height()/2.0); } void moveMinX(double x) { - maxX=x+width()-xBorder; + maxX=x+width(); minX=x; } void moveMinY(double y) { - maxY=y+height()-yBorder; + maxY=y+height(); minY=y; } double overlapX(const Rectangle &r) const { diff --git a/lib/vpsc/remove_rectangle_overlap.cpp b/lib/vpsc/remove_rectangle_overlap.cpp deleted file mode 100644 index 8dc74caa2..000000000 --- a/lib/vpsc/remove_rectangle_overlap.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/** - * \brief remove overlaps between a set of rectangles. - * - * Authors: - * Tim Dwyer - * - * Copyright (C) 2005 Authors - * - * This version is released under the CPL (Common Public License) with - * the Graphviz distribution. - * A version is also available under the LGPL as part of the Adaptagrams - * project: https://github.com/mjwybrow/adaptagrams. - * If you make improvements or bug fixes to this code it would be much - * appreciated if you could also contribute those changes back to the - * Adaptagrams repository. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -using std::ios; -using std::ofstream; - -#ifndef RECTANGLE_OVERLAP_LOGGING - #define RECTANGLE_OVERLAP_LOGGING 0 -#endif - -#define EXTRA_GAP 0.0001 - -double Rectangle::xBorder=0; -double Rectangle::yBorder=0; diff --git a/lib/vpsc/vpsc.vcxproj b/lib/vpsc/vpsc.vcxproj index 93bbb5fa5..94e298a5e 100644 --- a/lib/vpsc/vpsc.vcxproj +++ b/lib/vpsc/vpsc.vcxproj @@ -93,7 +93,6 @@ - diff --git a/lib/vpsc/vpsc.vcxproj.filters b/lib/vpsc/vpsc.vcxproj.filters index 6503c66e7..f37f17e17 100644 --- a/lib/vpsc/vpsc.vcxproj.filters +++ b/lib/vpsc/vpsc.vcxproj.filters @@ -62,9 +62,6 @@ Source Files - - Source Files - Source Files -- 2.40.0