| 76 | } |
| 77 | |
| 78 | void read_file(std::ifstream& ifs, ::TAO::String_Manager& str) |
| 79 | { |
| 80 | ifs.seekg(0, ios::end); |
| 81 | const std::ifstream::pos_type end_pos = ifs.tellg(); |
| 82 | ifs.seekg(0, ios::beg); |
| 83 | const std::ifstream::pos_type beg_pos = ifs.tellg(); |
| 84 | |
| 85 | const auto file_length = end_pos - beg_pos; |
| 86 | |
| 87 | std::vector<char> temp(static_cast<std::vector<char>::size_type>(file_length + 1)); |
| 88 | ifs.read(temp.data(), file_length); |
| 89 | temp[static_cast<std::vector<char>::size_type>(file_length)] = '\0'; |
| 90 | |
| 91 | const char* ptr = temp.data(); |
| 92 | str = ptr; |
| 93 | } |
| 94 | |
| 95 | class SpawnedProcess { |
| 96 | public: |
no test coverage detected