File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ namespace xcpp
2525 inline nl::json mime_repr (intptr_t V)
2626 {
2727 // Return a JSON mime bundle representing the specified value.
28- void * value = ( void *)V ;
28+ void * value_ptr = reinterpret_cast < void *>(V) ;
2929
3030 // Include "xcpp/xmime.hpp" only on the first time a variable is displayed.
3131 static bool xmime_included = false ;
@@ -43,16 +43,18 @@ namespace xcpp
4343 code << " using xcpp::mime_bundle_repr;" ;
4444 code << " mime_bundle_repr(" ;
4545 // code << "*(" << getTypeAsString(V);
46- code << &value ;
46+ code << &value_ptr ;
4747 code << " ));" ;
4848
4949 std::string codeString = code.str ();
5050
5151 mimeReprV = Cpp::Evaluate (codeString.c_str (), &hadError);
5252 }
5353
54- if (!hadError && mimeReprV != 0 ) {
55- return *(nl::json*)mimeReprV;
54+ void * mimeReprV_ptr = reinterpret_cast <void *>(V);
55+
56+ if (!hadError && mimeReprV_ptr) {
57+ return *(nl::json*) mimeReprV_ptr;
5658 } else {
5759 return nl::json::object ();
5860 }
You can’t perform that action at this time.
0 commit comments