| 870 | } |
| 871 | |
| 872 | bool FileRules::isDefault() const noexcept |
| 873 | { |
| 874 | if (m_impl->m_rules.size() == 1) |
| 875 | { |
| 876 | const auto & rule = m_impl->m_rules[0]; |
| 877 | if (rule->m_customKeys.getSize() == 0) |
| 878 | { |
| 879 | // NB: Don't need to check the rule name -- the default rule may not be removed, so if |
| 880 | // there is only one rule, it's the default one. |
| 881 | if (StringUtils::Compare(rule->getColorSpace(), ROLE_DEFAULT)) |
| 882 | { |
| 883 | return true; |
| 884 | } |
| 885 | } |
| 886 | } |
| 887 | return false; |
| 888 | } |
| 889 | |
| 890 | const char * FileRules::Impl::getColorSpaceFromFilepath(const Config & config, |
| 891 | const char * filePath) const |