Skip to content

Commit 8ce8894

Browse files
committed
chore: Support fixes
1 parent 90668f3 commit 8ce8894

File tree

3 files changed

+53
-4
lines changed

3 files changed

+53
-4
lines changed

include/mrdox/Support/ExecutorGroup.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ class ExecutorGroup
132132
group_.agents_.emplace_back(std::move(agent_));
133133
group_.impl_->cv_.notify_all();
134134
}
135+
136+
Agent& operator*() const noexcept
137+
{
138+
return *agent_;
139+
}
135140
};
136141

137142
void
@@ -153,7 +158,7 @@ class ExecutorGroup
153158
any_callable<void(Agent&)> work(std::move(work_.front()));
154159
work_.pop_front();
155160
unlock_guard unlock(impl_->mutex_);
156-
work(*agent);
161+
work(*scope);
157162
}
158163
});
159164
}

include/mrdox/Support/Path.hpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,22 @@ MRDOX_DECL
176176
std::string
177177
appendPath(
178178
std::string_view basePath,
179-
std::string_view pathName);
179+
std::string_view name);
180+
181+
MRDOX_DECL
182+
std::string
183+
appendPath(
184+
std::string_view basePath,
185+
std::string_view name1,
186+
std::string_view name2);
187+
188+
MRDOX_DECL
189+
std::string
190+
appendPath(
191+
std::string_view basePath,
192+
std::string_view name1,
193+
std::string_view name2,
194+
std::string_view name3);
180195

181196
/** Return an error if the path is not a directory.
182197
*/

source/Support/Path.cpp

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,41 @@ makePosixStyle(
229229
std::string
230230
appendPath(
231231
std::string_view basePath,
232-
std::string_view pathName)
232+
std::string_view name)
233+
{
234+
namespace path = llvm::sys::path;
235+
236+
SmallPathString temp(makeDirsy(basePath));
237+
path::append(temp, name);
238+
path::remove_dots(temp, true);
239+
return static_cast<std::string>(temp.str());
240+
}
241+
242+
std::string
243+
appendPath(
244+
std::string_view basePath,
245+
std::string_view name1,
246+
std::string_view name2)
247+
{
248+
namespace path = llvm::sys::path;
249+
250+
SmallPathString temp(makeDirsy(basePath));
251+
path::append(temp, name1, name2);
252+
path::remove_dots(temp, true);
253+
return static_cast<std::string>(temp.str());
254+
}
255+
256+
std::string
257+
appendPath(
258+
std::string_view basePath,
259+
std::string_view name1,
260+
std::string_view name2,
261+
std::string_view name3)
233262
{
234263
namespace path = llvm::sys::path;
235264

236265
SmallPathString temp(makeDirsy(basePath));
237-
path::append(temp, pathName);
266+
path::append(temp, name1, name2, name3);
238267
path::remove_dots(temp, true);
239268
return static_cast<std::string>(temp.str());
240269
}

0 commit comments

Comments
 (0)