diff options
author | Marius Kintel <marius@kintel.net> | 2012-02-02 21:50:51 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-02-02 21:50:51 (GMT) |
commit | 2def247b1b1307c1b236d22bbdc33d8bb9c102e3 (patch) | |
tree | 8f7514513f8bef84cc2076c1e4fb259545ddef70 /src/lexer.l | |
parent | 5056de8d1ce8bd6247604ff6523cc4894ec7de4e (diff) |
Minor refactor: use set/get_librarydir() to access global variable
Diffstat (limited to 'src/lexer.l')
-rw-r--r-- | src/lexer.l | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lexer.l b/src/lexer.l index 7f6586a..4e51e14 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -110,13 +110,13 @@ use[ \t\r\n>]*"<" { BEGIN(cond_use); } ">" { BEGIN(INITIAL); fs::path usepath; - if ( boosty::is_absolute( fs::path(filename) ) ) { + if (boosty::is_absolute(fs::path(filename))) { usepath = filename; } else { usepath = fs::path(parser_source_path) / filename; if (!fs::exists(usepath)) { - usepath = boosty::absolute(fs::path(librarydir) / filename); + usepath = boosty::absolute(fs::path(get_librarydir()) / filename); } } handle_dep(usepath.string()); @@ -199,7 +199,7 @@ void includefile() fs::path dirinfo = sourcepath(); if (!filepath.empty()) { - if (boosty::is_absolute( fs::path(filepath) ) ) { + if (boosty::is_absolute(fs::path(filepath))) { dirinfo = filepath; } else { @@ -209,7 +209,7 @@ void includefile() fs::path finfo = dirinfo / filename; if (!exists(finfo)) { - finfo = fs::path(librarydir) / filepath / filename; + finfo = fs::path(get_librarydir()) / filepath / filename; } filepath.clear(); |