File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ namespace xcpp
25
25
inline nl::json mime_repr (intptr_t V)
26
26
{
27
27
// Return a JSON mime bundle representing the specified value.
28
- void * value = ( void *)V ;
28
+ void * value_ptr = reinterpret_cast < void *>(V) ;
29
29
30
30
// Include "xcpp/xmime.hpp" only on the first time a variable is displayed.
31
31
static bool xmime_included = false ;
@@ -43,16 +43,18 @@ namespace xcpp
43
43
code << " using xcpp::mime_bundle_repr;" ;
44
44
code << " mime_bundle_repr(" ;
45
45
// code << "*(" << getTypeAsString(V);
46
- code << &value ;
46
+ code << &value_ptr ;
47
47
code << " ));" ;
48
48
49
49
std::string codeString = code.str ();
50
50
51
51
mimeReprV = Cpp::Evaluate (codeString.c_str (), &hadError);
52
52
}
53
53
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;
56
58
} else {
57
59
return nl::json::object ();
58
60
}
You can’t perform that action at this time.
0 commit comments