Skip to content

Commit

Permalink
Fix deprecated warnings for rivet
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Dec 4, 2023
1 parent cb950b1 commit 5cc3e26
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
38 changes: 38 additions & 0 deletions rivet-deprecated-warn.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
diff -Naur /include/Rivet/Math/MatrixN.hh b/include/Rivet/Math/MatrixN.hh
--- a/include/Rivet/Math/MatrixN.hh 2023-12-03 01:21:00.000000000 +0100
+++ b/include/Rivet/Math/MatrixN.hh 2023-12-04 12:13:12.539590815 +0100
@@ -66,8 +66,6 @@

Matrix() : _matrix(EMatrix::Zero()) {}

- Matrix(const Matrix<N>& other) : _matrix(other._matrix) {}
-
Matrix& set(const size_t i, const size_t j, const double value) {
if (i < N && j < N) {
_matrix(i, j) = value;
diff -Naur a/include/Rivet/Math/VectorN.hh b/include/Rivet/Math/VectorN.hh
--- a/include/Rivet/Math/VectorN.hh 2023-12-03 01:21:00.000000000 +0100
+++ b/include/Rivet/Math/VectorN.hh 2023-12-04 12:13:22.652275368 +0100
@@ -27,9 +27,6 @@
public:
Vector() : _vec(EVector::Zero()) { }

- Vector(const Vector<N>& other)
- : _vec(other._vec) { }
-
const double& get(const size_t index) const {
if (index >= N) {
throw std::runtime_error("Tried to access an invalid vector index.");
diff -Naur a/include/Rivet/Projection.hh b/include/Rivet/Projection.hh
--- a/include/Rivet/Projection.hh 2023-12-03 01:21:00.000000000 +0100
+++ b/include/Rivet/Projection.hh 2023-12-04 12:03:13.447281503 +0100
@@ -43,6 +43,9 @@
/// The default constructor.
Projection();

+ /// Copy constructor
+ Projection(const Projection&) = default;
+
/// Clone on the heap.
virtual unique_ptr<Projection> clone() const = 0;

4 changes: 2 additions & 2 deletions rivet.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
## INITENV +PATH PYTHON3PATH %{i}/${PYTHON3_LIB_SITE_PACKAGES}
## OLD GENSER Source: http://cern.ch/service-spi/external/MCGenerators/distribution/rivet/rivet-%{realversion}-src.tgz
Source: git+https://gitlab.com/hepcedar/rivet.git?obj=master/%{n}-%{realversion}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz

Patch0: rivet-deprecated-warn
Requires: hepmc fastjet fastjet-contrib yoda
BuildRequires: python3 py3-cython autotools

%prep
## OLD GENSER: %setup -n rivet/%{realversion}
%setup -n %{n}-%{realversion}
%patch0 -p1

# Update config.{guess,sub} to detect aarch64 and ppc64le
rm -f %{_tmppath}/config.{sub,guess}
Expand Down

0 comments on commit 5cc3e26

Please sign in to comment.