| 100 | } |
| 101 | |
| 102 | void processRemove(const std::string& line, int num, IptcData& iptcData) { |
| 103 | std::string::size_type keyStart = line.find_first_not_of(" \t", 1); |
| 104 | |
| 105 | if (keyStart == std::string::npos) { |
| 106 | std::ostringstream os; |
| 107 | os << "Invalid \'r\' command at line " << num; |
| 108 | throw Error(ErrorCode::kerErrorMessage, os.str()); |
| 109 | } |
| 110 | |
| 111 | const std::string key(line.substr(keyStart)); |
| 112 | IptcKey iptcKey(key); |
| 113 | |
| 114 | auto iter = iptcData.findKey(iptcKey); |
| 115 | if (iter != iptcData.end()) { |
| 116 | iptcData.erase(iter); |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | void processModify(const std::string& line, int num, IptcData& iptcData) { |
| 121 | std::string::size_type keyStart = line.find_first_not_of(" \t", 1); |
no test coverage detected