aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-10-10 23:07:20 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-10-15 11:58:18 +0100
commitab002a1d971df6e5c332d805fd55ed982d365325 (patch)
treec6aa40c418ee222d07240a5310ca5f21dfac26ef /src
parentMerge pull request #1203 (diff)
downloadmonero-ab002a1d971df6e5c332d805fd55ed982d365325.tar.xz
ringct: pass vectors by const ref where possible
Diffstat (limited to 'src')
-rw-r--r--src/ringct/rctOps.cpp4
-rw-r--r--src/ringct/rctOps.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/ringct/rctOps.cpp b/src/ringct/rctOps.cpp
index 488e47ca0..6a0e82d99 100644
--- a/src/ringct/rctOps.cpp
+++ b/src/ringct/rctOps.cpp
@@ -367,7 +367,7 @@ namespace rct {
//cn_fast_hash for multisig purpose
//This takes the outputs and commitments
//and hashes them into a 32 byte sized key
- key cn_fast_hash(ctkeyV PC) {
+ key cn_fast_hash(const ctkeyV &PC) {
key rv = identity();
std::size_t l = (std::size_t)PC.size();
size_t i = 0, j = 0;
@@ -380,7 +380,7 @@ namespace rct {
return rv;
}
- key hash_to_scalar(ctkeyV PC) {
+ key hash_to_scalar(const ctkeyV &PC) {
key rv = cn_fast_hash(PC);
sc_reduce32(rv.bytes);
return rv;
diff --git a/src/ringct/rctOps.h b/src/ringct/rctOps.h
index 1e71c645d..a7e13eefa 100644
--- a/src/ringct/rctOps.h
+++ b/src/ringct/rctOps.h
@@ -149,8 +149,8 @@ namespace rct {
//for mg sigs
key cn_fast_hash128(const void * in);
key hash_to_scalar128(const void * in);
- key cn_fast_hash(ctkeyV PC);
- key hash_to_scalar(ctkeyV PC);
+ key cn_fast_hash(const ctkeyV &PC);
+ key hash_to_scalar(const ctkeyV &PC);
//for mg sigs
key cn_fast_hash(const keyV &keys);
key hash_to_scalar(const keyV &keys);