Browse Source

whitespace clean up

master
Odilitime 5 years ago
parent
commit
3ffb313f38
  1. 21
      src/CFGFileParser.h

21
src/CFGFileParser.h

@ -18,18 +18,19 @@ namespace ntr{ @@ -18,18 +18,19 @@ namespace ntr{
bool fast_string_compare(fast_string t1, fast_string t2);
typedef std::unordered_map<fast_string,fast_string,std::function<decltype(string_hash)>,std::function<decltype(fast_string_compare)>,TLSFAlloc<std::pair<const fast_string, fast_string>>> stringmap;
}
// Class which holds the parsed configuration options after
// being processed by CFGFileParser. No longer a "trivial class"
// just select by cfg->GlobalSettings....
struct BrowserConfiguration{
ntr::stringmap GlobalSettings;
// fast allocation!
// fast allocation!
static void* operator new(std::size_t n){
if (void *mem = tlsf_malloc(n)){
return mem;
} throw std::bad_alloc {};
}
static void operator delete(void *p){
if (void *mem = tlsf_malloc(n)) {
return mem;
} throw std::bad_alloc {};
}
static void operator delete(void *p) {
tlsf_free(p);
}
void clear();
@ -39,12 +40,12 @@ class CFGFileParser { @@ -39,12 +40,12 @@ class CFGFileParser {
public:
CFGFileParser(const char* filename);
~CFGFileParser();
static void* operator new(std::size_t n){
static void* operator new(std::size_t n) {
if (void *mem = tlsf_malloc(n)){
return mem;
} throw std::bad_alloc {};
}
static void operator delete(void *p){
}
static void operator delete(void *p) {
tlsf_free(p);
}
private:
@ -52,4 +53,4 @@ private: @@ -52,4 +53,4 @@ private:
char *buffer;
struct stat *cfg_fileinfo;
};
#endif // __CFGFILEPARSER_H__
#endif // __CFGFILEPARSER_H__

Loading…
Cancel
Save