Skip to content

Commit

Permalink
Minor code edits
Browse files Browse the repository at this point in the history
  • Loading branch information
peteroupc committed Feb 1, 2025
1 parent 0f6adc1 commit bbcc093
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions CBORDocs2/DocVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,7 @@ public static string FormatTypeRaw(Type type) {
StringComparison.Ordinal) ?
"bool" : (name.Equals("System.Single", StringComparison.Ordinal) ?
"float" : (name.Equals("System.Double", StringComparison.Ordinal) ?
"double" :
name))))))))))))));
"double" : name))))))))))))));
}

public static string FormatTypeSig(Type typeInfo) {
Expand Down
3 changes: 1 addition & 2 deletions CBORDocs2/MemberSummaryVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ public MemberSummaryVisitor() {
public static string MemberName(object obj) {
return (obj is Type) ? ((Type)obj).FullName : ((obj is MethodInfo) ?
((MethodInfo)obj).Name : ((obj is PropertyInfo) ?
((PropertyInfo)obj).Name :
((obj is FieldInfo) ?
((PropertyInfo)obj).Name : ((obj is FieldInfo) ?

((FieldInfo)obj).Name : obj.ToString())));
}
Expand Down
2 changes: 1 addition & 1 deletion CBORTest/CBORObjectTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3247,7 +3247,7 @@ public void TestFromObject_Dictionary() {
IDictionary<string, string> dict = new Dictionary<string, string>
{
["TestKey"] = "TestValue",
["TestKey2"] = "TestValue2",
["TestKey2"] = "TestValue2",
};
var c = CBORObject.FromObject(dict);
CheckKeyValue(c, "TestKey", "TestValue");
Expand Down

0 comments on commit bbcc093

Please sign in to comment.