diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2016-09-03 12:04:36 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2016-09-03 12:04:36 -0400 |
commit | 976f4b6252f30f7e64cba83ec43d98eb260a5261 (patch) | |
tree | 5d9d1ba6ee648e6afc58767d144138cff1dc58b8 /indra/llcommon/llcoro_get_id.cpp | |
parent | f931f6ef521527a929ceddf1354c7e2d85b35b63 (diff) |
MAINT-5232: Break out LLCoros::get_id() into its own header file.
We need LLSingleton machinery to be able to reference get_id() without also
depending on all the rest of LLCoros -- since LLCoros isa LLSingleton.
Diffstat (limited to 'indra/llcommon/llcoro_get_id.cpp')
-rw-r--r-- | indra/llcommon/llcoro_get_id.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/indra/llcommon/llcoro_get_id.cpp b/indra/llcommon/llcoro_get_id.cpp new file mode 100644 index 0000000000..24ed1fe0c9 --- /dev/null +++ b/indra/llcommon/llcoro_get_id.cpp @@ -0,0 +1,32 @@ +/** + * @file llcoro_get_id.cpp + * @author Nat Goodspeed + * @date 2016-09-03 + * @brief Implementation for llcoro_get_id. + * + * $LicenseInfo:firstyear=2016&license=viewerlgpl$ + * Copyright (c) 2016, Linden Research, Inc. + * $/LicenseInfo$ + */ + +// Precompiled header +#include "linden_common.h" +// associated header +#include "llcoro_get_id.h" +// STL headers +// std headers +// external library headers +// other Linden headers +#include "llcoros.h" + +namespace llcoro +{ + +id get_id() +{ + // An instance of Current can convert to LLCoros::CoroData*, which can + // implicitly convert to void*, which is an llcoro::id. + return LLCoros::Current(); +} + +} // llcoro |