summaryrefslogtreecommitdiff
blob: 45cf973810cd0a26c1c843f04c78cc2b8b974a8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
diff -ur gnome-chemistry-utils-0.10.3.orig/libs/gcu/element.cc gnome-chemistry-utils-0.10.3/libs/gcu/element.cc
--- gnome-chemistry-utils-0.10.3.orig/libs/gcu/element.cc	2009-01-05 21:09:59.000000000 +0200
+++ gnome-chemistry-utils-0.10.3/libs/gcu/element.cc	2009-08-08 11:30:16.000000000 +0300
@@ -44,8 +44,8 @@
 
 static void ReadValue (char const *source, GcuValue &value)
 {
-	char *buf, *dot;
-	value.value = strtod (source, &buf);
+	const char *buf, *dot;
+	value.value = strtod (source, const_cast <char**> (&buf));
 	dot = strchr (source, '.');
 	value.prec = (dot)? buf - dot - 1: 0;
 	value.delta = (*buf == '(')? strtol (buf + 1, NULL, 10): 0;
@@ -53,8 +53,8 @@
 
 static void ReadDimensionalValue (char const *source, GcuDimensionalValue &value)
 {
-	char *buf, *dot;
-	value.value = strtod (source, &buf);
+	const char *buf, *dot;
+	value.value = strtod (source, const_cast <char**> (&buf));
 	dot = strchr (source, '.');
 	value.prec = (dot)? buf - dot - 1: 0;
 	value.delta = (*buf == '(')? strtol (buf + 1, NULL, 10): 0;
diff -ur gnome-chemistry-utils-0.10.3.orig/libs/gcu/spectrumdoc.cc gnome-chemistry-utils-0.10.3/libs/gcu/spectrumdoc.cc
--- gnome-chemistry-utils-0.10.3.orig/libs/gcu/spectrumdoc.cc	2009-01-05 21:09:59.000000000 +0200
+++ gnome-chemistry-utils-0.10.3/libs/gcu/spectrumdoc.cc	2009-08-08 11:29:46.000000000 +0300
@@ -1411,7 +1411,7 @@
 	char buf[32], c = data[0];
 	double val = 0., newval = 0.;
 	bool pos, diff = false;
-	char *eq = strstr (data, "$$");
+	char *eq = strstr (const_cast <char *> (data), "$$");
 	if (eq)
 		*eq = 0;
 	pos = true;