Skip to content

Commit

Permalink
C++ compilation issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ravi688 committed Feb 7, 2022
1 parent b0967e7 commit 4ac74bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/hpml/mat4/template_definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ HPML_API T* const* const __mat4_data(T)(mat4_t(T)* m)\
}

/*mat4_move*/
#define mat4_move(T) move(mat4_t(T))
#define mat4_move(T) hpml_move(mat4_t(T))
#define instantiate_declaration_mat4_move(T) instantiate_declaration_move(mat4_t(T))
#define instantiate_implementation_mat4_move(T) instantiate_implementation_move(mat4_t(T))

/*mat4_copy*/
#define mat4_copy(T) copy(mat4_t(T))
#define mat4_copy(T) hpml_copy(mat4_t(T))
#define instantiate_declaration_mat4_copy(T) instantiate_declaration_copy(mat4_t(T))
#define instantiate_implementation_mat4_copy(T) instantiate_implementation_copy(mat4_t(T))

Expand Down
8 changes: 4 additions & 4 deletions include/hpml/memory/template_definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
#define EXTERN_C
#endif

#define move(T) c_template(move, T)
#define instantiate_declaration_move(T) EXTERN_C HPML_API void move(T)(T* dst, T src)
#define hpml_move(T) c_template(hpml_move, T)
#define instantiate_declaration_move(T) EXTERN_C HPML_API void hpml_move(T)(T* dst, T src)
#define instantiate_implementation_move(T)\
EXTERN_C HPML_API void move(T)(T* dst, T src)\
EXTERN_C HPML_API void hpml_move(T)(T* dst, T src)\
{\
memcpy(dst, &src, sizeof(T));\
}

#define copy(T)(dst, src) memcpy(T)(&dst, &src, sizeof(T))
#define hpml_copy(T)(dst, src) memcpy(T)(&dst, &src, sizeof(T))
#define instantiate_declaration_copy(T) NOT_IMPLEMENTED
#define instantiate_implementation_copy(T) NOT_IMPLEMENTED

0 comments on commit 4ac74bf

Please sign in to comment.