windowmanager destructor free _mainwindow, fix save - remove const in (#36)
* windowmanager destructor free _mainwindow, fix save - remove const in settingsPath that is being written to from ptree tree * syntax error * remove destructor, singleton, let OS claim the resource as no special cleanup of _mainWindow is not needed
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define MESSAGEBUILDER_H
|
||||
|
||||
#include "messages/message.h"
|
||||
#include <ctime>
|
||||
|
||||
namespace chatterino {
|
||||
namespace messages {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef WINNATIVEWINDOW_H
|
||||
#define WINNATIVEWINDOW_H
|
||||
|
||||
#define NOMINMAX
|
||||
#include "Windows.h"
|
||||
#include "Windowsx.h"
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "twitch/twitchuser.h"
|
||||
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#ifdef USEWINSDK
|
||||
#define NOMINMAX
|
||||
#include "Windows.h"
|
||||
#endif
|
||||
|
||||
|
||||
+2
-3
@@ -10,8 +10,7 @@ namespace chatterino {
|
||||
WindowManager WindowManager::instance;
|
||||
|
||||
WindowManager::WindowManager()
|
||||
: _windowMutex()
|
||||
, _mainWindow(nullptr)
|
||||
: _mainWindow(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -103,7 +102,7 @@ void WindowManager::load()
|
||||
|
||||
void WindowManager::save()
|
||||
{
|
||||
const auto &settingsPath = getSettingsPath();
|
||||
auto &settingsPath = getSettingsPath();
|
||||
boost::property_tree::ptree tree;
|
||||
|
||||
// Create windows array
|
||||
|
||||
Reference in New Issue
Block a user