MCPcopy Create free account
hub / github.com/ZDoom/Raze / AddSearchPath

Function AddSearchPath

source/core/searchpaths.cpp:58–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57
58void AddSearchPath(TArray<FString>& searchpaths, const char* path)
59{
60 auto fpath = M_GetNormalizedPath(path);
61 if (fpath.Len() > 1 && fpath.Back() == '/') fpath.Truncate(fpath.Len() - 1);
62 if (DirExists(fpath.GetChars()))
63 {
64 if (searchpaths.Find(fpath) == searchpaths.Size())
65 searchpaths.Push(fpath);
66 }
67}
68
69#ifndef _WIN32
70

Callers 2

G_AddExternalSearchPathsFunction · 0.85
CollectSearchPathsFunction · 0.85

Calls 9

DirExistsFunction · 0.85
LenMethod · 0.80
TruncateMethod · 0.80
M_GetNormalizedPathFunction · 0.50
BackMethod · 0.45
GetCharsMethod · 0.45
FindMethod · 0.45
SizeMethod · 0.45
PushMethod · 0.45

Tested by

no test coverage detected