Commit 185f356d authored by Botond Baranyi's avatar Botond Baranyi
Browse files

Optimized function Type::can_have_coding



Change-Id: Ic91961a62d581c42a4a21aacadb59bd702dac1a9
Signed-off-by: Botond Baranyi's avatarBotond Baranyi <botond.baranyi@ericsson.com>
parent cb2befc7
...@@ -3509,6 +3509,14 @@ namespace Common { ...@@ -3509,6 +3509,14 @@ namespace Common {
return false; return false;
} }
// optimization: if it already has the encoding set, then the answer is true
for (size_t i = 0; i < coding_table.size(); ++i) {
if (coding_table[i]->built_in &&
coding_table[i]->built_in_coding == coding) {
return true;
}
}
switch (typetype) { switch (typetype) {
case T_SEQ_T: case T_SEQ_T:
case T_SEQ_A: case T_SEQ_A:
......
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