Skip to content

Commit feae077

Browse files
committed
Made RelativePath private
1 parent b7fe792 commit feae077

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Diff for: legacy/builder/types/types.go

+6-7
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525

2626
type SourceFile struct {
2727
// Path to the source file within the sketch/library root folder
28-
RelativePath *paths.Path
28+
relativePath *paths.Path
2929

3030
// Set to the Library object of origin if this source file comes
3131
// from a library
@@ -43,8 +43,7 @@ type SourceFile struct {
4343
}
4444

4545
func (f *SourceFile) Equals(g *SourceFile) bool {
46-
return f.Library == g.Library &&
47-
f.RelativePath.EqualsTo(g.RelativePath) &&
46+
return f.relativePath.EqualsTo(g.relativePath) &&
4847
f.buildRoot.EqualsTo(g.buildRoot) &&
4948
f.sourceRoot.EqualsTo(g.sourceRoot)
5049
}
@@ -74,20 +73,20 @@ func MakeSourceFile(ctx *Context, origin interface{}, path *paths.Path) (*Source
7473
return nil, err
7574
}
7675
}
77-
res.RelativePath = path
76+
res.relativePath = path
7877
return res, nil
7978
}
8079

8180
func (f *SourceFile) SourcePath() *paths.Path {
82-
return f.sourceRoot.JoinPath(f.RelativePath)
81+
return f.sourceRoot.JoinPath(f.relativePath)
8382
}
8483

8584
func (f *SourceFile) ObjectPath() *paths.Path {
86-
return f.buildRoot.Join(f.RelativePath.String() + ".o")
85+
return f.buildRoot.Join(f.relativePath.String() + ".o")
8786
}
8887

8988
func (f *SourceFile) DepfilePath() *paths.Path {
90-
return f.buildRoot.Join(f.RelativePath.String() + ".d")
89+
return f.buildRoot.Join(f.relativePath.String() + ".d")
9190
}
9291

9392
type LibraryResolutionResult struct {

0 commit comments

Comments
 (0)