Skip to content

Commit

Permalink
Trying to correct issues with reference and pointer types.
Browse files Browse the repository at this point in the history
  • Loading branch information
playmer committed Mar 7, 2017
1 parent 9606e2c commit 9d07cc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions Reflection/Type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ struct TypeIdentification<T&>
{
static inline Type* TypeId()
{
static Type type{ ::TypeId<T>(), Type::Modifier::Reference, static_cast<T*>(nullptr) };
static Type type{ ::TypeId<T>(), Type::Modifier::Reference, static_cast<T*&>(nullptr) };

return &type;
}
Expand All @@ -236,7 +236,7 @@ struct TypeIdentification<const T>
{
static inline Type* TypeId()
{
static Type type{ ::TypeId<T>(), Type::Modifier::Const, static_cast<T*>(nullptr) };
static Type type{ ::TypeId<T>(), Type::Modifier::Const, static_cast<const T*>(nullptr) };

return &type;
}
Expand Down Expand Up @@ -282,11 +282,6 @@ DeclareExternalType(float)
DeclareExternalType(double)
DeclareExternalType(std::string)

// TODO: Probably shouldn't need this. Look into const stuff/why a const i8 doesn't work.
//DeclareExternalType(char)
//DeclareExternalType(const char)



#include "Function.hpp"
#include "Property.hpp"
Expand Down
2 changes: 1 addition & 1 deletion Reflection/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ int main()
auto u8_Type = TypeId<u8>();
//auto char_Type = TypeId<char>;
auto i8_Type = TypeId<i8>();
auto const_char = TypeId<const char>();
auto const_char = TypeId<const char*>();


auto animalType = Test::Test2::Animal::GetStaticType();
Expand Down

0 comments on commit 9d07cc3

Please sign in to comment.