Commit e4c7511e authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

CppEditor: Accept const Function in FunctionHelper

Change-Id: Id21c958c1528c5cbdb507aa3fc297bd14bcfb13e
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent 6889547f
......@@ -232,7 +232,8 @@ IAssistProcessor *VirtualFunctionAssistProvider::createProcessor() const
enum VirtualType { Virtual, PureVirtual };
static bool isVirtualFunction_helper(Function *function, const Snapshot &snapshot,
static bool isVirtualFunction_helper(const Function *function,
const Snapshot &snapshot,
VirtualType virtualType)
{
if (!function)
......@@ -270,12 +271,12 @@ static bool isVirtualFunction_helper(Function *function, const Snapshot &snapsho
return false;
}
bool FunctionHelper::isVirtualFunction(Function *function, const Snapshot &snapshot)
bool FunctionHelper::isVirtualFunction(const Function *function, const Snapshot &snapshot)
{
return isVirtualFunction_helper(function, snapshot, Virtual);
}
bool FunctionHelper::isPureVirtualFunction(Function *function, const Snapshot &snapshot)
bool FunctionHelper::isPureVirtualFunction(const Function *function, const Snapshot &snapshot)
{
return isVirtualFunction_helper(function, snapshot, PureVirtual);
}
......
......@@ -64,14 +64,15 @@ private:
class FunctionHelper
{
public:
static bool isVirtualFunction(CPlusPlus::Function *function,
const CPlusPlus::Snapshot &snapshot);
static bool isVirtualFunction(const CPlusPlus::Function *function,
const CPlusPlus::Snapshot &snapshot);
static bool isPureVirtualFunction(CPlusPlus::Function *function,
const CPlusPlus::Snapshot &snapshot);
static bool isPureVirtualFunction(const CPlusPlus::Function *function,
const CPlusPlus::Snapshot &snapshot);
static QList<CPlusPlus::Symbol *> overrides(CPlusPlus::Class *startClass,
CPlusPlus::Function *function, const CPlusPlus::Snapshot &snapshot);
CPlusPlus::Function *function,
const CPlusPlus::Snapshot &snapshot);
};
} // namespace Internal
......
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