@@ -76,7 +76,7 @@ namespace simplecpp {
7676 */
7777 class SIMPLECPP_LIB Location {
7878 public:
79- explicit Location (const std::vector<std::string> &f) : files(f), fileIndex( 0 ), line( 1U ), col( 0U ) {}
79+ explicit Location (const std::vector<std::string> &f) : files(f) {}
8080
8181 Location (const Location &loc) = default ;
8282
@@ -109,9 +109,9 @@ namespace simplecpp {
109109 }
110110
111111 const std::vector<std::string> &files;
112- unsigned int fileIndex;
113- unsigned int line;
114- unsigned int col;
112+ unsigned int fileIndex{} ;
113+ unsigned int line{ 1 } ;
114+ unsigned int col{} ;
115115 private:
116116 static const std::string emptyFileName;
117117 };
@@ -123,12 +123,12 @@ namespace simplecpp {
123123 class SIMPLECPP_LIB Token {
124124 public:
125125 Token (const TokenString &s, const Location &loc, bool wsahead = false ) :
126- whitespaceahead (wsahead), location(loc), previous( nullptr ), next( nullptr ), nextcond( nullptr ), string(s) {
126+ whitespaceahead (wsahead), location(loc), string(s) {
127127 flags ();
128128 }
129129
130130 Token (const Token &tok) :
131- macro (tok.macro), op(tok.op), comment(tok.comment), name(tok.name), number(tok.number), whitespaceahead(tok.whitespaceahead), location(tok.location), previous( nullptr ), next( nullptr ), nextcond( nullptr ), string(tok.string), mExpandedFrom (tok.mExpandedFrom ) {}
131+ macro (tok.macro), op(tok.op), comment(tok.comment), name(tok.name), number(tok.number), whitespaceahead(tok.whitespaceahead), location(tok.location), string(tok.string), mExpandedFrom (tok.mExpandedFrom ) {}
132132
133133 const TokenString& str () const {
134134 return string;
@@ -153,9 +153,9 @@ namespace simplecpp {
153153 bool number;
154154 bool whitespaceahead;
155155 Location location;
156- Token *previous;
157- Token *next;
158- mutable const Token *nextcond;
156+ Token *previous{} ;
157+ Token *next{} ;
158+ mutable const Token *nextcond{} ;
159159
160160 const Token *previousSkipComments () const {
161161 const Token *tok = this ->previous ;
@@ -393,14 +393,14 @@ namespace simplecpp {
393393 * On the command line these are configured by -D, -U, -I, --include, -std
394394 */
395395 struct SIMPLECPP_LIB DUI {
396- DUI () : clearIncludeCache( false ), removeComments( false ) {}
396+ DUI () = default ;
397397 std::list<std::string> defines;
398398 std::set<std::string> undefined;
399399 std::list<std::string> includePaths;
400400 std::list<std::string> includes;
401401 std::string std;
402- bool clearIncludeCache;
403- bool removeComments; /* * remove comment tokens from included files */
402+ bool clearIncludeCache{} ;
403+ bool removeComments{} ; /* * remove comment tokens from included files */
404404 };
405405
406406 struct SIMPLECPP_LIB FileData {
0 commit comments