| 3144 | } |
| 3145 | |
| 3146 | int Config::getIndexForNamedTransform(const char * name) const noexcept |
| 3147 | { |
| 3148 | ConstNamedTransformRcPtr nt = getNamedTransform(name); |
| 3149 | if (!nt) |
| 3150 | { |
| 3151 | return -1; |
| 3152 | } |
| 3153 | |
| 3154 | // Check to see if the name is an active named transform. |
| 3155 | const auto num = getNumNamedTransforms(NAMEDTRANSFORM_ACTIVE); |
| 3156 | for (int idx = 0; idx < num; ++idx) |
| 3157 | { |
| 3158 | if (strcmp(getNamedTransformNameByIndex(NAMEDTRANSFORM_ACTIVE, idx), nt->getName()) == 0) |
| 3159 | { |
| 3160 | return idx; |
| 3161 | } |
| 3162 | } |
| 3163 | |
| 3164 | // Requests for an inactive named transform or an inactive color space will both fail. |
| 3165 | return -1; |
| 3166 | |
| 3167 | } |
| 3168 | |
| 3169 | void Config::addNamedTransform(const ConstNamedTransformRcPtr & nt) |
| 3170 | { |