mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-26 07:25:00 -07:00
Improve usage of file_id
This commit is contained in:
+6
-2
@@ -731,8 +731,12 @@ struct Ast {
|
||||
|
||||
// NOTE(bill): I know I dislike methods but this is hopefully a temporary thing
|
||||
// for refactoring purposes
|
||||
AstFile *file() const {
|
||||
return get_ast_file_from_id(this->file_id);
|
||||
gb_inline AstFile *file() const {
|
||||
// NOTE(bill): This doesn't need to call get_ast_file_from_id which
|
||||
return global_files[this->file_id];
|
||||
}
|
||||
gb_inline AstFile *thread_safe_file() const {
|
||||
return thread_safe_get_ast_file_from_id(this->file_id);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user