Skip to content

bstone_sys_window_size.h is unreferenced and would not compile #574

Description

@AdamCoulterOz

src/bstone/src/bstone_sys_window_size.h looks like a leftover. On wip it is not included by anything, is not listed in src/bstone/CMakeLists.txt, and could not compile if it were used:

#include "bstone_sys_r2_extent.h"   // no such file; the tree has bstone_r2_extent.h

namespace bstone {
namespace sys {

struct WindowSize : R2Extent      // no such type; bstone_r2_extent.h declares
{                                 // R2ExtentT<T> and R2ExtentI, in namespace bstone
    using R2Extent::R2Extent;
};

It also declares bstone::sys::WindowSize, which already exists as a different type — bstone_sys_window.h:109 defines it as a plain { int width; int height; }. Nothing includes both today, so the collision is dormant, but any file that ever did would not build.

I ran into it while looking at whether sys::RendererOutputSize in bstone_sys_renderer.h could reuse sys::WindowSize instead. It cannot as things stand — bstone_sys_window.h includes bstone_sys_renderer.h, so the renderer header cannot include the window one, and splitting the type into its own header is the natural fix. That is presumably what this file was for.

So either it is a half-finished split worth completing — in which case the include and the base type need correcting, and bstone_sys_window.h should use it rather than declare its own — or it is dead and can go. Happy to send a patch for whichever you prefer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions