diff options
Diffstat (limited to 'src/tools/rcc/rcc.cpp')
-rw-r--r-- | src/tools/rcc/rcc.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp index 7bd1ac0bc6..6f00168b72 100644 --- a/src/tools/rcc/rcc.cpp +++ b/src/tools/rcc/rcc.cpp @@ -938,10 +938,14 @@ bool RCCResourceLibrary::writeDataNames() return true; } -static bool qt_rcc_compare_hash(const RCCFileInfo *left, const RCCFileInfo *right) +struct qt_rcc_compare_hash { - return qt_hash(left->m_name) < qt_hash(right->m_name); -} + typedef bool result_type; + result_type operator()(const RCCFileInfo *left, const RCCFileInfo *right) const + { + return qt_hash(left->m_name) < qt_hash(right->m_name); + } +}; bool RCCResourceLibrary::writeDataStructure() { @@ -963,7 +967,7 @@ bool RCCResourceLibrary::writeDataStructure() //sort by hash value for binary lookup QList<RCCFileInfo*> m_children = file->m_children.values(); - std::sort(m_children.begin(), m_children.end(), qt_rcc_compare_hash); + std::sort(m_children.begin(), m_children.end(), qt_rcc_compare_hash()); //write out the actual data now for (int i = 0; i < m_children.size(); ++i) { @@ -982,7 +986,7 @@ bool RCCResourceLibrary::writeDataStructure() //sort by hash value for binary lookup QList<RCCFileInfo*> m_children = file->m_children.values(); - std::sort(m_children.begin(), m_children.end(), qt_rcc_compare_hash); + std::sort(m_children.begin(), m_children.end(), qt_rcc_compare_hash()); //write out the actual data now for (int i = 0; i < m_children.size(); ++i) { |