Optimize some code and cleanup code style in natvis file
This commit is contained in:
@@ -118,7 +118,7 @@ struct MConverter<String>
|
||||
{
|
||||
MString** dataPtr = MCore::Array::GetAddress<MString*>(data);
|
||||
for (int32 i = 0; i < result.Length(); i++)
|
||||
MUtils::ToString(dataPtr[i], result[i]);
|
||||
MUtils::ToString(dataPtr[i], result.Get()[i]);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -151,7 +151,7 @@ struct MConverter<StringAnsi>
|
||||
{
|
||||
MString** dataPtr = MCore::Array::GetAddress<MString*>(data);
|
||||
for (int32 i = 0; i < result.Length(); i++)
|
||||
MUtils::ToString(dataPtr[i], result[i]);
|
||||
MUtils::ToString(dataPtr[i], result.Get()[i]);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -184,7 +184,7 @@ struct MConverter<StringView>
|
||||
{
|
||||
MString** dataPtr = MCore::Array::GetAddress<MString*>(data);
|
||||
for (int32 i = 0; i < result.Length(); i++)
|
||||
MUtils::ToString(dataPtr[i], result[i]);
|
||||
MUtils::ToString(dataPtr[i], result.Get()[i]);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -217,7 +217,7 @@ struct MConverter<Variant>
|
||||
{
|
||||
MObject** dataPtr = MCore::Array::GetAddress<MObject*>(data);
|
||||
for (int32 i = 0; i < result.Length(); i++)
|
||||
result[i] = MUtils::UnboxVariant(dataPtr[i]);
|
||||
result.Get()[i] = MUtils::UnboxVariant(dataPtr[i]);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -250,7 +250,7 @@ struct MConverter<T*, typename TEnableIf<TIsBaseOf<class ScriptingObject, T>::Va
|
||||
{
|
||||
MObject** dataPtr = MCore::Array::GetAddress<MObject*>(data);
|
||||
for (int32 i = 0; i < result.Length(); i++)
|
||||
result[i] = (T*)ScriptingObject::ToNative(dataPtr[i]);
|
||||
result.Get()[i] = (T*)ScriptingObject::ToNative(dataPtr[i]);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -307,7 +307,7 @@ struct MConverter<ScriptingObjectReference<T>>
|
||||
{
|
||||
MObject** dataPtr = MCore::Array::GetAddress<MObject*>(data);
|
||||
for (int32 i = 0; i < result.Length(); i++)
|
||||
result[i] = (T*)ScriptingObject::ToNative(dataPtr[i]);
|
||||
result.Get()[i] = (T*)ScriptingObject::ToNative(dataPtr[i]);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -343,7 +343,7 @@ struct MConverter<AssetReference<T>>
|
||||
{
|
||||
MObject** dataPtr = MCore::Array::GetAddress<MObject*>(data);
|
||||
for (int32 i = 0; i < result.Length(); i++)
|
||||
result[i] = (T*)ScriptingObject::ToNative(dataPtr[i]);
|
||||
result.Get()[i] = (T*)ScriptingObject::ToNative(dataPtr[i]);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<Expand>
|
||||
<Item Name="[Size]" ExcludeView="simple">_count</Item>
|
||||
<Item Name="[Capacity]" ExcludeView="simple">_capacity</Item>
|
||||
<ArrayItems Condition="_count <= _capacity">
|
||||
<ArrayItems Condition="_count <= _capacity">
|
||||
<Size>_count</Size>
|
||||
<ValuePointer>_allocation._data</ValuePointer>
|
||||
</ArrayItems>
|
||||
@@ -153,22 +153,22 @@
|
||||
</ArrayItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
|
||||
<!-- Vector2/Float2/Double2/Int2 -->
|
||||
<Type Name="Vector2Base<*>">
|
||||
<DisplayString>{{ X={X}, Y={Y} }}</DisplayString>
|
||||
</Type>
|
||||
|
||||
|
||||
<!-- Vector3/Float3/Double3/Int3 -->
|
||||
<Type Name="Vector3Base<*>">
|
||||
<DisplayString>{{ X={X}, Y={Y}, Z={Z} }}</DisplayString>
|
||||
</Type>
|
||||
|
||||
|
||||
<!-- Vector4/Float4/Double4/Int4 -->
|
||||
<Type Name="Vector4Base<*>">
|
||||
<DisplayString>{{ X={X}, Y={Y}, Z={Z}, W={W} }}</DisplayString>
|
||||
</Type>
|
||||
|
||||
|
||||
<!-- Quaternion -->
|
||||
<Type Name="Quaternion">
|
||||
<DisplayString>{{ X={X}, Y={Y}, Z={Z}, W={W} }}</DisplayString>
|
||||
@@ -231,7 +231,7 @@
|
||||
<DisplayString>{{ Length={_length} }}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[Length]" ExcludeView="simple">_length</Item>
|
||||
<ArrayItems Condition="_data != nullptr">
|
||||
<ArrayItems Condition="_data != nullptr">
|
||||
<Size>_length</Size>
|
||||
<ValuePointer>_data</ValuePointer>
|
||||
</ArrayItems>
|
||||
|
||||
Reference in New Issue
Block a user