Add feedback from PVS (static code analyzer)
https://pvs-studio.com/en/blog/posts/cpp/1153/
This commit is contained in:
@@ -80,7 +80,7 @@ namespace FlaxEditor.Content
|
||||
// Translate asset type name
|
||||
var typeName = TypeName;
|
||||
string[] typeNamespaces = typeName.Split('.');
|
||||
if (typeNamespaces.Length != 0 && typeNamespaces.Length != 0)
|
||||
if (typeNamespaces.Length != 0 && typeNamespaces[typeNamespaces.Length - 1].Length != 0)
|
||||
{
|
||||
typeName = Utilities.Utils.GetPropertyNameUI(typeNamespaces[typeNamespaces.Length - 1]);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace FlaxEditor.GUI.Dialogs
|
||||
/// <summary>
|
||||
/// The parent window.
|
||||
/// </summary>
|
||||
protected Window _window;
|
||||
protected volatile Window _window;
|
||||
|
||||
/// <summary>
|
||||
/// The dialog result.
|
||||
|
||||
@@ -492,7 +492,7 @@ namespace FlaxEditor.Surface
|
||||
Focus();
|
||||
return true;
|
||||
}
|
||||
if (_rightMouseDown || (_middleMouseDown && _middleMouseDown))
|
||||
if (_rightMouseDown || _middleMouseDown)
|
||||
{
|
||||
// Start navigating
|
||||
StartMouseCapture();
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace FlaxEditor.Utilities
|
||||
value = Convert.ToInt32(value);
|
||||
else if (type.Type == typeof(long))
|
||||
value = Convert.ToInt64(value);
|
||||
else if (type.Type == typeof(int))
|
||||
else if (type.Type == typeof(ushort))
|
||||
value = Convert.ToUInt16(value);
|
||||
else if (type.Type == typeof(uint))
|
||||
value = Convert.ToUInt32(value);
|
||||
|
||||
Reference in New Issue
Block a user