| 193 | // |
| 194 | template <typename Container, typename Splitter> |
| 195 | void AppendTo(Container* container, Splitter splitter) { |
| 196 | if (container->empty()) { |
| 197 | // "Appending" to an empty container is by far the common case. For this we |
| 198 | // assign directly to the output container, which is more efficient than |
| 199 | // explicitly appending. |
| 200 | *container = splitter; // Calls implicit conversion operator. |
| 201 | } else { |
| 202 | AppendToImpl(container, splitter); |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | } // anonymous namespace |
| 207 |
no test coverage detected