Big cleanup of rampant using std.
This commit is contained in:
parent
fcd1225370
commit
453c50c563
15 changed files with 49 additions and 40 deletions
17
builder.cpp
17
builder.cpp
|
@ -18,18 +18,17 @@
|
|||
#include <stdlib.h> // for EXIT_SUCCESS
|
||||
#include <string> // for operator+, to_string
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <fstream>
|
||||
|
||||
using namespace std;
|
||||
using std::string;
|
||||
using namespace fmt;
|
||||
using namespace nlohmann;
|
||||
|
||||
#define BUF_MAX 1024
|
||||
|
||||
Builder::Builder(GUI &g, GameEngine &engine) : gui(g), game(engine) {
|
||||
ifstream infile(".tarpit.json");
|
||||
std::ifstream infile(".tarpit.json");
|
||||
json config = json::parse(infile);
|
||||
|
||||
config["git_path"].template get_to<string>(git_path);
|
||||
|
@ -37,14 +36,14 @@ Builder::Builder(GUI &g, GameEngine &engine) : gui(g), game(engine) {
|
|||
}
|
||||
|
||||
Task<unsigned> Builder::run_build() {
|
||||
regex err_re("(.*?):([0-9]+):([0-9]+):\\s*(.*?):\\s*(.*)\n*");
|
||||
std::regex err_re("(.*?):([0-9]+):([0-9]+):\\s*(.*?):\\s*(.*)\n*");
|
||||
|
||||
char buffer[BUF_MAX]; // BUF_MAX is a define already?
|
||||
ofstream stats_out;
|
||||
std::ofstream stats_out;
|
||||
|
||||
co_await Pass{};
|
||||
|
||||
stats_out.open("stats.csv", ios::out | ios::app);
|
||||
stats_out.open("stats.csv", std::ios::out | std::ios::app);
|
||||
std::time_t tstamp = std::time(nullptr);
|
||||
|
||||
dbc::check(stats_out.good(), "Error opening stats.csv file.");
|
||||
|
@ -64,10 +63,8 @@ Task<unsigned> Builder::run_build() {
|
|||
co_yield 3;
|
||||
string line(buffer); // yeah, that's probably a problem
|
||||
|
||||
cerr << buffer;
|
||||
|
||||
smatch err;
|
||||
bool match = regex_match(line, err, err_re);
|
||||
std::smatch err;
|
||||
bool match = std::regex_match(line, err, err_re);
|
||||
|
||||
if(match) {
|
||||
string file_name = err[1].str();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue