File: yaml-cpp.patch

package info (click to toggle)
rivet 1.8.3-1.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 29,332 kB
  • ctags: 10,713
  • sloc: cpp: 59,356; sh: 11,294; python: 6,747; ansic: 1,751; makefile: 1,538
file content (41 lines) | stat: -rw-r--r-- 2,104 bytes parent folder | download | duplicates (2)
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
38
39
40
41
diff --git a/src/Core/AnalysisInfo.cc b/src/Core/AnalysisInfo.cc
index 9aa03f2..b6eacb7 100644
--- a/src/Core/AnalysisInfo.cc
+++ b/src/Core/AnalysisInfo.cc
@@ -64,8 +64,8 @@ namespace Rivet {
           const YAML::Node& beampairs = it.second();
           vector<PdgIdPair> beam_pairs;
           if (beampairs.size() == 2 &&
-              beampairs[0].GetType() == YAML::CT_SCALAR &&
-              beampairs[1].GetType() == YAML::CT_SCALAR) {
+              beampairs[0].Type() == YAML::NodeType::Scalar &&
+              beampairs[1].Type() == YAML::NodeType::Scalar) {
             string bstr0, bstr1;
             beampairs[0] >> bstr0;
             beampairs[1] >> bstr1;
@@ -74,8 +74,8 @@ namespace Rivet {
             for (YAML::Iterator bpi = beampairs.begin(); bpi != beampairs.end(); ++bpi) {
               const YAML::Node& bp = *bpi;
               if (bp.size() == 2 &&
-                  bp[0].GetType() == YAML::CT_SCALAR &&
-                  bp[1].GetType() == YAML::CT_SCALAR) {
+                  bp[0].Type() == YAML::NodeType::Scalar &&
+                  bp[1].Type() == YAML::NodeType::Scalar) {
                 string bstr0, bstr1;
                 bp[0] >> bstr0;
                 bp[1] >> bstr1;
@@ -91,12 +91,12 @@ namespace Rivet {
           const YAML::Node& energies = it.second();
           vector<pair<double,double> > beam_energy_pairs;
           for (YAML::Iterator be = energies.begin(); be != energies.end(); ++be) {
-            if (be->GetType() == YAML::CT_SCALAR) {
+            if (be->Type() == YAML::NodeType::Scalar) {
               // If beam energy is a scalar, then assume symmetric beams each with half that energy
               double sqrts;
               *be >> sqrts;
               beam_energy_pairs += make_pair(sqrts/2.0, sqrts/2.0);
-            } else if (be->GetType() == YAML::CT_SEQUENCE) {
+            } else if (be->Type() == YAML::NodeType::Sequence) {
               const YAML::Node& beseq = *be;
               // If the sub-sequence is of length 1, then it's another scalar sqrt(s)!
               if (beseq.size() == 1) {