Commit 30bc0b10 authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

Making getParameter const on Instruction

parent 8895b758
......@@ -160,7 +160,7 @@ public:
return weights;
}
virtual InstructionParameter getParameter(const int idx) {
virtual InstructionParameter getParameter(const int idx) const {
XACCError("DWKernel does not contain runtime parameters.");
}
......
......@@ -142,7 +142,7 @@ public:
* @param idx The index of the parameter.
* @return param The InstructionParameter at the given index.
*/
virtual InstructionParameter getParameter(const int idx) {
virtual InstructionParameter getParameter(const int idx) const {
return parameter;
}
......
......@@ -154,7 +154,7 @@ public:
return retStr;
}
virtual InstructionParameter getParameter(const int idx) {
virtual InstructionParameter getParameter(const int idx) const {
if (idx + 1 > parameters.size()) {
XACCError("Invalid Parameter requested.");
}
......
......@@ -141,7 +141,7 @@ public:
enabled = true;
}
virtual InstructionParameter getParameter(const int idx) {
virtual InstructionParameter getParameter(const int idx) const {
if (idx + 1 > parameters.size()) {
XACCError("Invalid Parameter requested from Parameterized Gate Instruction.");
}
......
......@@ -95,7 +95,7 @@ public:
* @param idx The index of the parameter.
* @return param The InstructionParameter at the given index.
*/
virtual InstructionParameter getParameter(const int idx) = 0;
virtual InstructionParameter getParameter(const int idx) const = 0;
/**
* Return all of this Instruction's parameters.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment