| 1852 | |
| 1853 | template <typename T> |
| 1854 | static std::optional<T> load(ktxHashListEntry* entry) { |
| 1855 | if (entry) { |
| 1856 | T newEntry; |
| 1857 | ktxHashListEntry_GetValue(entry, &newEntry.valueLen, reinterpret_cast<void**>(&newEntry.value)); |
| 1858 | if (newEntry.value) |
| 1859 | return std::optional<T>(std::move(newEntry)); |
| 1860 | } |
| 1861 | return std::optional<T>(); |
| 1862 | } |
| 1863 | |
| 1864 | virtual bool isDifferent(const KVEntry& other) const { |
| 1865 | return valueLen != other.valueLen || memcmp(value, other.value, valueLen) != 0; |