diff options
author | Alexander Harkness <me@bearbin.net> | 2015-12-19 15:30:32 +0100 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2015-12-19 15:30:32 +0100 |
commit | 8b851d504875906afe3b40dd87f642fd7d5a93f1 (patch) | |
tree | bdc9006f78ba8ae91e26213130d07e67124b044f /src/Generating | |
parent | Merge pull request #2774 from cuberite/worktycho-patch-1 (diff) | |
download | cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.tar cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.tar.gz cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.tar.bz2 cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.tar.lz cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.tar.xz cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.tar.zst cuberite-8b851d504875906afe3b40dd87f642fd7d5a93f1.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/IntGen.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/Generating/IntGen.h b/src/Generating/IntGen.h index 3f94ec3d0..708dc0550 100644 --- a/src/Generating/IntGen.h +++ b/src/Generating/IntGen.h @@ -67,10 +67,10 @@ public: /** Generates the array of templated size into a_Values, based on given min coords. */ virtual void GetInts(int a_MinX, int a_MinZ, Values & a_Values) = 0; - + }; -// Code adapted from http://stackoverflow.com/questions/7858817/unpacking-a-tuple-to-call-a-matching-function-pointer +// Code adapted from https://stackoverflow.com/questions/7858817/unpacking-a-tuple-to-call-a-matching-function-pointer template<int... > struct sSeq @@ -92,7 +92,7 @@ struct sGens<0, S...> template<class Gen, class... Args> class cIntGenFactory { - + public: typedef Gen Generator; @@ -101,7 +101,7 @@ public: m_args(std::make_tuple<Args...>(std::forward<Args>(a_args)...)) { } - + template <class LhsGen> std::shared_ptr<Gen> construct(LhsGen&& a_Lhs) { @@ -111,13 +111,13 @@ public: private: std::tuple<Args...> m_args; - + template <class LhsGen, int... S> std::shared_ptr<Gen> construct_impl(LhsGen&& a_Lhs, sSeq<S...>) { return std::make_shared<Gen>(std::get<S>(m_args)..., std::forward<LhsGen>(a_Lhs)); } - + }; template<class T, class RhsGen, class... Args> @@ -1466,7 +1466,3 @@ protected: Underlying m_Underlying; Underlying m_Alteration; }; - - - - |