From 818f766066fc6b6a0f5a5e6bed0b59b7f976588d Mon Sep 17 00:00:00 2001 From: ThePhD Date: Tue, 17 Apr 2018 15:04:17 -0400 Subject: [PATCH] Trying to clean up all the macros. One day, I'll finish the configuration layer and everything will be beautiful. --- examples/coroutine_state.cpp | 2 +- examples/shared_ptr.cpp | 2 ++ examples/unique_ptr.cpp | 2 ++ sol/compatibility/version.hpp | 4 +++- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/coroutine_state.cpp b/examples/coroutine_state.cpp index 5b8edff2..8ac2c92e 100644 --- a/examples/coroutine_state.cpp +++ b/examples/coroutine_state.cpp @@ -1,4 +1,4 @@ -#define SOL_CHECK_ARGUMENTS +#define SOL_CHECK_ARGUMENTS 1 #include #include "assert.hpp" diff --git a/examples/shared_ptr.cpp b/examples/shared_ptr.cpp index 149b1fba..02bc05c7 100644 --- a/examples/shared_ptr.cpp +++ b/examples/shared_ptr.cpp @@ -23,11 +23,13 @@ struct my_type { my_type& operator=(const my_type& other) { value = other.value; std::cout << "my_type at " << static_cast(this) << " being copy-assigned to!" << std::endl; + return *this; } my_type& operator=(my_type&& other) { value = other.value; std::cout << "my_type at " << static_cast(this) << " being move-assigned to!" << std::endl; + return *this; } ~my_type() { diff --git a/examples/unique_ptr.cpp b/examples/unique_ptr.cpp index 399de564..78613f3c 100644 --- a/examples/unique_ptr.cpp +++ b/examples/unique_ptr.cpp @@ -23,11 +23,13 @@ struct my_type { my_type& operator=(const my_type& other) { value = other.value; std::cout << "my_type at " << static_cast(this) << " being copy-assigned to!" << std::endl; + return *this; } my_type& operator=(my_type&& other) { value = other.value; std::cout << "my_type at " << static_cast(this) << " being move-assigned to!" << std::endl; + return *this; } ~my_type() { diff --git a/sol/compatibility/version.hpp b/sol/compatibility/version.hpp index c7cd1caa..2ba42449 100644 --- a/sol/compatibility/version.hpp +++ b/sol/compatibility/version.hpp @@ -42,8 +42,10 @@ #ifdef LUAJIT_VERSION #ifndef SOL_LUAJIT -#define SOL_LUAJIT +#define SOL_LUAJIT 1 +#ifndef SOL_LUAJIT_VERSION #define SOL_LUAJIT_VERSION LUAJIT_VERSION_NUM +#endif // SOL_LUAJIT_VERSION definition, if not present #endif // sol luajit #endif // luajit