将以下代码放在内联函数中是否合理,或者内联太大:
getPriority(const Data& data)
{
Priority plidPriority = PRIORITY_STANDARD;
if (data.isIPaddr)
{
Priority = PRIORITY_HIGHEST;
}
else if (data.plid == PROTO_HTTP || data.plid == PROTO_SIP || data.plid == PROTO_RTCP)
{
Priority = PRIORITY_PLID;
}
else if (data.port && data.port < 1024)
{
Priority = PRIORITY_ELEVATED;
}
return Priority;
}