feat: Implement resource system Phase 2 - Concrete resource types
- Add Material class with shader/texture bindings and property system - Add MaterialLoader for .mat/.json format - Add Shader class (Vertex/Fragment/Geometry/Compute) - Add ShaderLoader for .vert/.frag/.glsl/.hlsl - Add AudioClip class (WAV/OGG/MP3/FLAC support) - Add AudioLoader for audio files - Add Texture/Mesh classes and loaders (from design doc) - Fix HashMap iterator and String API usage - Fix Mutex compatibility with std::lock_guard - Update CMakeLists.txt with new resource files - All tests pass: 11 Resources + 51 Containers
This commit is contained in:
@@ -237,7 +237,10 @@ bool HashMap<Key, Value>::Erase(const Key& key) {
|
||||
auto it = FindInBucket(bucket, key);
|
||||
if (it != bucket.pairs.end()) {
|
||||
size_t index = it - bucket.pairs.begin();
|
||||
bucket.pairs[index] = bucket.pairs.Back();
|
||||
|
||||
if (index != bucket.pairs.Size() - 1) {
|
||||
bucket.pairs[index] = std::move(bucket.pairs.Back());
|
||||
}
|
||||
bucket.pairs.PopBack();
|
||||
--m_size;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user