Big cleanup of rampant using std.
This commit is contained in:
parent
fcd1225370
commit
453c50c563
15 changed files with 49 additions and 40 deletions
8
gui.cpp
8
gui.cpp
|
@ -4,21 +4,21 @@
|
|||
#include <fmt/core.h>
|
||||
#include <memory> // for allocator, shared_ptr
|
||||
#include <string> // for operator+, to_string
|
||||
#include <thread> // for sleep_for
|
||||
#include <vector>
|
||||
#include <SFML/Audio.hpp>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <fstream>
|
||||
#include "sfmlgui.hpp"
|
||||
|
||||
using namespace std;
|
||||
using std::string, std::vector;
|
||||
|
||||
using namespace fmt;
|
||||
using namespace nlohmann;
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
void SoundQuip::load(json &data, const char *file_key) {
|
||||
auto audio = data["audio"];
|
||||
json::string_t file_name = audio[file_key].template get<std::string>();
|
||||
json::string_t file_name = audio[file_key].template get<string>();
|
||||
|
||||
if(!buffer.loadFromFile(file_name)) {
|
||||
println("Failed to load sound: {} with file {}", file_key, file_name);
|
||||
|
@ -36,7 +36,7 @@ void SoundQuip::stop() {
|
|||
}
|
||||
|
||||
GUI::GUI() {
|
||||
ifstream infile(".tarpit.json");
|
||||
std::ifstream infile(".tarpit.json");
|
||||
json data = json::parse(infile);
|
||||
|
||||
// json load the config file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue