diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-09-03 17:41:23 -0400 |
|---|---|---|
| committer | Tim Foley <tfoleyNV@users.noreply.github.com> | 2019-09-03 14:41:23 -0700 |
| commit | 146c343f967fdc23f9627a0b9afa58ba2e80449d (patch) | |
| tree | d0bc6c780ad9b1942a605dc68fef9478391df7f8 /tools/render-test/cpu-memory-binding.h | |
| parent | b5b3a8d36c09631cbd4cf236c0280a314436748d (diff) | |
Make CPUMemoryBinding::Location use a ctor. (#1042)
Diffstat (limited to 'tools/render-test/cpu-memory-binding.h')
| -rw-r--r-- | tools/render-test/cpu-memory-binding.h | 14 |
1 files changed, 6 insertions, 8 deletions
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; |
