Find the equivalent to @p _data in the list of allocations of solidity_alloc(), removes it from the list and returns its value. If any invalid argument is being passed, it is considered a programming error on the caller-side and hence, will call abort() then.
| 51 | /// If any invalid argument is being passed, it is considered a programming error |
| 52 | /// on the caller-side and hence, will call abort() then. |
| 53 | std::string takeOverAllocation(char const* _data) |
| 54 | { |
| 55 | for (auto iter = begin(solidityAllocations); iter != end(solidityAllocations); ++iter) |
| 56 | if (iter->data() == _data) |
| 57 | { |
| 58 | std::string chunk = std::move(*iter); |
| 59 | solidityAllocations.erase(iter); |
| 60 | return chunk; |
| 61 | } |
| 62 | |
| 63 | abort(); |
| 64 | } |
| 65 | |
| 66 | /// Resizes a std::string to the proper length based on the occurrence of a zero terminator. |
| 67 | void truncateCString(std::string& _data) |
no test coverage detected