summaryrefslogtreecommitdiff
path: root/indra/llcommon/llcoro_get_id.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llcoro_get_id.cpp')
-rw-r--r--indra/llcommon/llcoro_get_id.cpp32
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