Skip to content

Commit 5893fef

Browse files
committed
fix: add comments
1 parent 8868b34 commit 5893fef

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lua/cmake-tools/config.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ local Config = {
3333

3434
function Config:new(const)
3535
local obj = {}
36-
setmetatable(obj, self)
37-
self.__index = self
36+
setmetatable(obj, { __index = self }) -- when obj cannot find key in its table, it will try to find it from its __index value
3837

3938
obj:update_build_dir(const.cmake_build_directory, const.cmake_build_directory)
4039

0 commit comments

Comments
 (0)