Don't copy data needlessly

This commit is contained in:
Roland Kaufmann committed 2013-11-25 14:14:50 +01:00
1 parent f83d581e42
commit f45f7d19a0
1 file changed
+2 -2
+2 -2
View File
@@ -171,7 +171,7 @@ private:
/// Helper function that is the meat of the constructor
template <typename U>
void copyData (std::vector <U> data,
void copyData (const std::vector <U>& data,
const int offset,
const int stride) {
// number of elements to take
@@ -186,7 +186,7 @@ private:
// Compute the number of outputs this dataset will give
template <typename U>
int dataSize (std::vector <U> data,
int dataSize (const std::vector <U>& data,
const int offset,
const int stride) {
// number of elements we can possibly take from the vector