Skip to content

Commit 803df0a

Browse files
committed
fix CCDictionaryExt
1 parent 39b7090 commit 803df0a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/pages/Attributes.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ void DevTools::drawNodeAttributes(CCNode* node) {
140140
if (auto textureProtocol = typeinfo_cast<CCTextureProtocol*>(node)) {
141141
if (auto texture = textureProtocol->getTexture()) {
142142
auto* cachedTextures = CCTextureCache::sharedTextureCache()->m_pTextures;
143-
for (auto [key, obj] : CCDictionaryExt<std::string, CCTexture2D>(cachedTextures)) {
143+
for (auto [key, obj] : CCDictionaryExt<std::string, CCTexture2D*>(cachedTextures)) {
144144
if (obj == texture) {
145145
ImGui::TextWrapped("Texture name: %s", key.c_str());
146146
break;
@@ -150,7 +150,7 @@ void DevTools::drawNodeAttributes(CCNode* node) {
150150
if (auto spriteNode = typeinfo_cast<CCSprite*>(node)) {
151151
auto* cachedFrames = CCSpriteFrameCache::sharedSpriteFrameCache()->m_pSpriteFrames;
152152
const auto rect = spriteNode->getTextureRect();
153-
for (auto [key, frame] : CCDictionaryExt<std::string, CCSpriteFrame>(cachedFrames)) {
153+
for (auto [key, frame] : CCDictionaryExt<std::string, CCSpriteFrame*>(cachedFrames)) {
154154
if (frame->getTexture() == texture && frame->getRect() == rect) {
155155
ImGui::Text("Frame name: %s", key.c_str());
156156
break;

0 commit comments

Comments
 (0)