@@ -137,7 +137,7 @@ std::string GetExecutablePath(const char *Argv0, void *MainAddr) {
137
137
return llvm::sys::fs::getMainExecutable (Argv0, MainAddr);
138
138
}
139
139
140
- void GetAssetFiles (clang::doc::ClangDocContext CDCtx) {
140
+ void GetAssetFiles (clang::doc::ClangDocContext & CDCtx) {
141
141
std::error_code Code;
142
142
for (auto DirIt = llvm::sys::fs::directory_iterator (
143
143
std::string (UserAssetPath), Code),
@@ -146,16 +146,17 @@ void GetAssetFiles(clang::doc::ClangDocContext CDCtx) {
146
146
llvm::SmallString<128 > filePath = llvm::SmallString<128 >(DirIt->path ());
147
147
if (llvm::sys::fs::is_regular_file (filePath)) {
148
148
if (filePath.ends_with (" .css" )) {
149
- CDCtx.UserStylesheets .push_back (std::string (filePath));
149
+ CDCtx.UserStylesheets .insert (CDCtx.UserStylesheets .begin (),
150
+ std::string (filePath));
150
151
} else if (filePath.ends_with (" .js" )) {
151
- CDCtx.FilesToCopy .push_back ( std::string ( filePath));
152
+ CDCtx.FilesToCopy .emplace_back ( filePath. str ( ));
152
153
}
153
154
}
154
155
}
155
156
}
156
157
157
158
void GetDefaultAssetFiles (const char *Argv0,
158
- clang::doc::ClangDocContext CDCtx) {
159
+ clang::doc::ClangDocContext & CDCtx) {
159
160
void *MainAddr = (void *)(intptr_t )GetExecutablePath;
160
161
std::string ClangDocPath = GetExecutablePath (Argv0, MainAddr);
161
162
llvm::SmallString<128 > NativeClangDocPath;
0 commit comments