Correct safe function
This commit is contained in:
parent
aea1ee6822
commit
32b6c523c3
2 changed files with 3 additions and 12 deletions
|
@ -12,18 +12,9 @@ namespace data {
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace gui {
|
namespace gui {
|
||||||
using modulesType = std::unordered_map<std::string, data::BasicData *>;
|
|
||||||
class Window;
|
|
||||||
|
|
||||||
[[nodiscard]] static std::optional<Window> create_window(
|
|
||||||
const GLFWerrorfun errorCallback,
|
|
||||||
GLFWframebuffersizefun framebufferCallback,
|
|
||||||
const bool debugOpengl,
|
|
||||||
GLFWwindow *shared,
|
|
||||||
std::initializer_list<modulesType::value_type> initializer) noexcept;
|
|
||||||
|
|
||||||
class Window final {
|
class Window final {
|
||||||
public:
|
public:
|
||||||
|
using modulesType = std::unordered_map<std::string, data::BasicData *>;
|
||||||
using windowPtr = GLFWwindow *;
|
using windowPtr = GLFWwindow *;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -60,7 +51,7 @@ namespace gui {
|
||||||
|
|
||||||
Window(Window &&window) noexcept = default;
|
Window(Window &&window) noexcept = default;
|
||||||
|
|
||||||
[[nodiscard]] friend std::optional<Window> create_window(
|
[[nodiscard]] static std::optional<Window> create_window(
|
||||||
const GLFWerrorfun errorCallback,
|
const GLFWerrorfun errorCallback,
|
||||||
GLFWframebuffersizefun framebufferCallback,
|
GLFWframebuffersizefun framebufferCallback,
|
||||||
const bool debugOpengl,
|
const bool debugOpengl,
|
||||||
|
|
|
@ -111,7 +111,7 @@ namespace gui {
|
||||||
glfwMakeContextCurrent(wwindow.get());
|
glfwMakeContextCurrent(wwindow.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<Window> create_window(
|
std::optional<Window> Window::create_window(
|
||||||
const GLFWerrorfun errorCallback,
|
const GLFWerrorfun errorCallback,
|
||||||
const GLFWframebuffersizefun framebufferCallback,
|
const GLFWframebuffersizefun framebufferCallback,
|
||||||
const bool debugOpengl,
|
const bool debugOpengl,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue