summaryrefslogtreecommitdiffstats
path: root/src/libvpsc
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2012-01-07 06:41:41 +0000
committerJon A. Cruz <jon@joncruz.org>2012-01-07 06:41:41 +0000
commitec9a78255750312a39997cc1c21a33bc9d400725 (patch)
treeb8f2619d4c265e3ff7a16f949fc86909aa8e364a /src/libvpsc
parentFixed warning under gcc 4.5.2 (diff)
downloadinkscape-ec9a78255750312a39997cc1c21a33bc9d400725.tar.gz
inkscape-ec9a78255750312a39997cc1c21a33bc9d400725.zip
Fixed incorrect forward declarations.
(bzr r10855)
Diffstat (limited to 'src/libvpsc')
-rw-r--r--src/libvpsc/csolve_VPSC.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/libvpsc/csolve_VPSC.h b/src/libvpsc/csolve_VPSC.h
index 92179fc77..b0d01e763 100644
--- a/src/libvpsc/csolve_VPSC.h
+++ b/src/libvpsc/csolve_VPSC.h
@@ -10,14 +10,21 @@
*
* Released under GNU LGPL. Read the file 'COPYING' for more information.
*/
-#ifndef _CSOLVE_VPSC_H_
-#define _CSOLVE_VPSC_H_
+#ifndef CSOLVE_VPSC_H_
+#define CSOLVE_VPSC_H_
#ifdef __cplusplus
-class vpsc::Variable;
-class vpsc::Constraint;
-class vpsc::Solver;
-class vpsc::IncSolver;
-using namespace vpsc;
+namespace vpsc
+{
+ class Variable;
+ class Constraint;
+ class Solver;
+ class IncSolver;
+}
+/* TODO 'using' should never be in a .h file. We need a different approach here. */
+using vpsc::Variable;
+using vpsc::Constraint;
+using vpsc::Solver;
+using vpsc::IncSolver;
extern "C" {
#else
typedef struct Variable Variable;
@@ -25,6 +32,7 @@ typedef struct Constraint Constraint;
typedef struct Solver Solver;
typedef struct IncSolver IncSolver;
#endif
+
Variable* newVariable(int id, double desiredPos, double weight);
void setVariableDesiredPos(Variable *, double desiredPos);
double getVariablePos(Variable*);
@@ -48,7 +56,7 @@ typedef struct pointf_s { double x, y; } pointf;
typedef struct { pointf LL, UR; } boxf;
#endif
int genXConstraints(int n, boxf[], Variable** vs, Constraint*** cs,
- int transitiveClosure);
+ int transitiveClosure);
int genYConstraints(int n, boxf[], Variable** vs, Constraint*** cs);
void satisfyVPSC(Solver*);
@@ -59,4 +67,4 @@ int getSplitCnt(IncSolver *vpsc);
#ifdef __cplusplus
}
#endif
-#endif /* _CSOLVE_VPSC_H_ */
+#endif /* CSOLVE_VPSC_H_ */