From 146c343f967fdc23f9627a0b9afa58ba2e80449d Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 3 Sep 2019 17:41:23 -0400 Subject: Make CPUMemoryBinding::Location use a ctor. (#1042) --- tools/render-test/cpu-memory-binding.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'tools/render-test/cpu-memory-binding.h') diff --git a/tools/render-test/cpu-memory-binding.h b/tools/render-test/cpu-memory-binding.h index 994dacacd..36bc15c6b 100644 --- a/tools/render-test/cpu-memory-binding.h +++ b/tools/render-test/cpu-memory-binding.h @@ -27,16 +27,14 @@ struct CPUMemoryBinding slang::TypeLayoutReflection* getTypeLayout() const { return m_typeLayout; } uint8_t* getPtr() const { return m_cur; } - Location():m_cur(nullptr) {} - - static Location make(slang::TypeLayoutReflection* typeLayout, uint8_t* ptr) + SLANG_FORCE_INLINE Location():m_typeLayout(nullptr), m_cur(nullptr) {} + + SLANG_FORCE_INLINE Location(slang::TypeLayoutReflection* typeLayout, uint8_t* ptr): + m_typeLayout(typeLayout), + m_cur(ptr) { - Location loc; - loc.m_typeLayout = typeLayout; - loc.m_cur = ptr; - return loc; } - + protected: slang::TypeLayoutReflection* m_typeLayout; uint8_t* m_cur; -- cgit v1.2.3