| 164 | } |
| 165 | |
| 166 | void Error::setMsg(int count) { |
| 167 | std::string msg{_(errList.at(static_cast<size_t>(code_)))}; |
| 168 | auto pos = msg.find("%0"); |
| 169 | if (pos != std::string::npos) { |
| 170 | msg.replace(pos, 2, std::to_string(static_cast<int>(code_))); |
| 171 | } |
| 172 | if (count > 0) { |
| 173 | pos = msg.find("%1"); |
| 174 | if (pos != std::string::npos) { |
| 175 | msg.replace(pos, 2, arg1_); |
| 176 | } |
| 177 | } |
| 178 | if (count > 1) { |
| 179 | pos = msg.find("%2"); |
| 180 | if (pos != std::string::npos) { |
| 181 | msg.replace(pos, 2, arg2_); |
| 182 | } |
| 183 | } |
| 184 | if (count > 2) { |
| 185 | pos = msg.find("%3"); |
| 186 | if (pos != std::string::npos) { |
| 187 | msg.replace(pos, 2, arg3_); |
| 188 | } |
| 189 | } |
| 190 | msg_ = msg; |
| 191 | } |
| 192 | |
| 193 | } // namespace Exiv2 |
nothing calls this directly
no outgoing calls
no test coverage detected