]> granicus.if.org Git - graphviz/commitdiff
make the Rectangles parameter to generateXConstraints const
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 22 May 2021 04:33:41 +0000 (21:33 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 29 May 2021 00:02:43 +0000 (17:02 -0700)
This no longer needs to be mutable.

lib/vpsc/generate-constraints.cpp
lib/vpsc/generate-constraints.h

index 7349bf57193db719bc89cadbcfd4422d10e91465..5c905898774b7599dd436d375597703241eea4be 100644 (file)
@@ -139,7 +139,7 @@ static bool compare_events(const Event &ea, const Event &eb) {
  * useNeighbourLists determines whether or not a heuristic is used to deciding whether to resolve
  * all overlap in the x pass, or leave some overlaps for the y pass.
  */
-int generateXConstraints(vector<Rectangle*> &rs, Variable** vars,
+int generateXConstraints(const vector<Rectangle*> &rs, Variable** vars,
          Constraint** &cs, const bool useNeighbourLists) {
 
        vector<Event> events;
index 1b22d4a363b75238dcb2bdc793781d0c85a9bf71..ef1e1c70f53a77447ed577c4b140ba50ff337152 100644 (file)
@@ -77,7 +77,7 @@ struct Variable;
 struct Constraint;
 
 // returns number of constraints generated
-int generateXConstraints(std::vector<Rectangle*> &rs, Variable** vars,
+int generateXConstraints(const std::vector<Rectangle*> &rs, Variable** vars,
        Constraint** &cs, const bool useNeighbourLists);
 int generateYConstraints(std::vector<Rectangle*> &rs, Variable** vars,
        Constraint** &cs);