Config: Use unique_ptr instead of raw pointer
This commit is contained in:
parent
ba2a54a9dd
commit
48366b1071
2 changed files with 12 additions and 14 deletions
|
@ -4,19 +4,19 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
class INIReader;
|
||||
#include <inih/cpp/INIReader.h>
|
||||
|
||||
class Config {
|
||||
INIReader* sdl2_config;
|
||||
std::unique_ptr<INIReader> sdl2_config;
|
||||
std::string sdl2_config_loc;
|
||||
|
||||
bool LoadINI(INIReader* config, const char* location, const std::string& default_contents="", bool retry=true);
|
||||
bool LoadINI(const std::string& default_contents="", bool retry=true);
|
||||
void ReadValues();
|
||||
public:
|
||||
Config();
|
||||
~Config();
|
||||
|
||||
void Reload();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue