I think these can be reversed?

That way your Get() could just return the GUIWindow* directly:

```
if (id == 0 || id == WINDOW_INVALID)
  return NULL;
CGUIWindow *window = m_idCache.Get(id);
if (window)
  return window;
```