Skip to content

Commit

Permalink
Use std::copy to copy arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesjer authored and leoneifler committed Jan 31, 2024
1 parent 492848c commit 08cc39c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/soplex/datahashtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
#ifndef _DATAHASHTABLE_H_
#define _DATAHASHTABLE_H_

#include <algorithm>
#include <iostream>
#include <iterator>
#include <assert.h>
#include <limits.h>

Expand Down Expand Up @@ -358,7 +360,7 @@ class DataHashTable
m_memfactor = base.m_memfactor;
m_used = base.m_used;
m_hashsize = base.m_hashsize;
primes = base.primes;
std::copy(std::begin(base.primes), std::end(base.primes), std::begin(primes));
nprimes = base.nprimes;

assert(m_memfactor > 1.0);
Expand All @@ -373,9 +375,9 @@ class DataHashTable
, m_memfactor(base.m_memfactor)
, m_used(base.m_used)
, m_hashsize(base.m_hashsize)
, primes(base.primes)
, nprimes(base.nprimes)
{
std::copy(std::begin(base.primes), std::end(base.primes), std::begin(primes));
assert(m_memfactor > 1.0);
assert(isConsistent());
}
Expand Down

0 comments on commit 08cc39c

Please sign in to comment.