Skip to content

Commit

Permalink
fix weejobs macos build issues:
Browse files Browse the repository at this point in the history
- std::mutex doesn't have a string as a constructor.
- initialize of a reference doesn't compile on clang
  • Loading branch information
remoe committed Feb 21, 2024
1 parent e4b82aa commit fea7744
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/osgEarth/Containers
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ namespace osgEarth { namespace Util
struct PerObjectFastMap
{
PerObjectFastMap() { }
PerObjectFastMap(const std::string& name) : _mutex(name) { }
PerObjectFastMap(const std::string& name) : _mutex() { }
bool threadsafe = true;

struct Functor {
Expand Down
6 changes: 3 additions & 3 deletions src/osgEarth/weejobs.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,19 +391,19 @@ namespace WEEJOBS_NAMESPACE
//! value to the continuation function. The continuation function in turn must
//! return a value (cannot be void).
template<typename FUNC, typename R = typename detail::result_of_t<FUNC(const T&, cancelable&)>>
inline future<R> then_dispatch(FUNC func, const context& con = {});
inline future<R> then_dispatch(FUNC func, const context& con );

//! Add a continuation to this future. Instead of the functor returning a value,
//! it will instead have the option of resolving the incoming future/promise object.
//! This is useful for operations that have their own way of running asynchronous code.
//! Note: for some reason when you use this variant you must specific the template
//! argument, e.g. result.then<int>(auto i, promise<int> p)
template<typename R>
inline future<R> then_dispatch(std::function<void(const T&, future<R>&)> func, const context& con = {});
inline future<R> then_dispatch(std::function<void(const T&, future<R>&)> func, const context& con);

//! Add a continuation to this future. The functor only takes an input value and has no
//! return value (fire and forget).
inline void then_dispatch(std::function<void(const T&)> func, const context& con = {});
inline void then_dispatch(std::function<void(const T&)> func, const context& con );

private:
std::shared_ptr<shared_t> _shared;
Expand Down

0 comments on commit fea7744

Please sign in to comment.