config.cpp

changeset 104
6e29bb0e83c5
parent 99
920d51fec412
child 146
2ab24976acaa
equal deleted inserted replaced
103:b0a345196435 104:6e29bb0e83c5
1 /* 1 /*
2 * LDForge: LDraw parts authoring CAD 2 * LDForge: LDraw parts authoring CAD
3 * Copyright (C) 2013 Santeri `arezey` Piippo 3 * Copyright (C) 2013 Santeri Piippo
4 * 4 *
5 * This program is free software: you can redistribute it and/or modify 5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or 7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version. 8 * (at your option) any later version.
18 18
19 #include <stdio.h> 19 #include <stdio.h>
20 #include <stdlib.h> 20 #include <stdlib.h>
21 #include <errno.h> 21 #include <errno.h>
22 #include <time.h> 22 #include <time.h>
23 #include <QDir>
24 #include "common.h"
23 #include "str.h" 25 #include "str.h"
24 #include "config.h" 26 #include "config.h"
25 #include <QDir>
26 27
27 std::vector<config*> g_pConfigPointers; 28 std::vector<config*> g_pConfigPointers;
28 29
29 // ============================================================================= 30 // =============================================================================
30 const char* g_WeekdayNames[7] = { 31 const char* g_WeekdayNames[7] = {
97 } 98 }
98 99
99 str entry = str (line).substr (0, equals - line); 100 str entry = str (line).substr (0, equals - line);
100 101
101 // Find the config entry for this. 102 // Find the config entry for this.
102 config* cfg = nullptr; 103 config* cfg = null;
103 for (config* i : g_pConfigPointers) 104 for (config* i : g_pConfigPointers)
104 if (entry == i->name) 105 if (entry == i->name)
105 cfg = i; 106 cfg = i;
106 107
107 if (!cfg) { 108 if (!cfg) {

mercurial