Skip to content

Optimization in MapCache::Load_User_Maps #1033

Open
@xezon

Description

@xezon
bool MapCache::Load_User_Maps()
{
...
                    if (g_theFileSystem->Get_File_Info(map_path, &info)) {
                        char dest[PATH_MAX];
                        strcpy(dest, map_path.Str());

                        for (const char *c = dest; *c != '\0'; c++) {
                            if (*c == '\\' || *c == '/') {
                                c++;
                            }
                        }

                        m_seen[map_path] = true;
                        map_added |= Add_Map(map_root, *it, &info, g_theWriteableGlobalData->m_buildMapCache);
                    } else {
                        captainslog_dbgassert(false, "Could not get file info for map %s", (*it).Str());
                    }
...
}

The for loop does nothing. Can be removed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions