Skip to content

Commit ca55901

Browse files
committed
Remove unused Visitor var
1 parent 424444f commit ca55901

9 files changed

+648
-755
lines changed

Protos/SwiftProtobufTests/generated_swift_names_enum_cases.proto

Lines changed: 72 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -893,77 +893,76 @@ enum GeneratedSwiftReservedEnum {
893893
VerificationState = 886;
894894
Version = 887;
895895
versionString = 888;
896-
visitDefaultValues = 889;
897-
visitExtensionFields = 890;
898-
visitExtensionFieldsAsMessageSet = 891;
899-
visitMapField = 892;
900-
visitor = 893;
901-
visitPacked = 894;
902-
visitPackedBoolField = 895;
903-
visitPackedDoubleField = 896;
904-
visitPackedEnumField = 897;
905-
visitPackedFixed32Field = 898;
906-
visitPackedFixed64Field = 899;
907-
visitPackedFloatField = 900;
908-
visitPackedInt32Field = 901;
909-
visitPackedInt64Field = 902;
910-
visitPackedSFixed32Field = 903;
911-
visitPackedSFixed64Field = 904;
912-
visitPackedSInt32Field = 905;
913-
visitPackedSInt64Field = 906;
914-
visitPackedUInt32Field = 907;
915-
visitPackedUInt64Field = 908;
916-
visitRepeated = 909;
917-
visitRepeatedBoolField = 910;
918-
visitRepeatedBytesField = 911;
919-
visitRepeatedDoubleField = 912;
920-
visitRepeatedEnumField = 913;
921-
visitRepeatedFixed32Field = 914;
922-
visitRepeatedFixed64Field = 915;
923-
visitRepeatedFloatField = 916;
924-
visitRepeatedGroupField = 917;
925-
visitRepeatedInt32Field = 918;
926-
visitRepeatedInt64Field = 919;
927-
visitRepeatedMessageField = 920;
928-
visitRepeatedSFixed32Field = 921;
929-
visitRepeatedSFixed64Field = 922;
930-
visitRepeatedSInt32Field = 923;
931-
visitRepeatedSInt64Field = 924;
932-
visitRepeatedStringField = 925;
933-
visitRepeatedUInt32Field = 926;
934-
visitRepeatedUInt64Field = 927;
935-
visitSingular = 928;
936-
visitSingularBoolField = 929;
937-
visitSingularBytesField = 930;
938-
visitSingularDoubleField = 931;
939-
visitSingularEnumField = 932;
940-
visitSingularFixed32Field = 933;
941-
visitSingularFixed64Field = 934;
942-
visitSingularFloatField = 935;
943-
visitSingularGroupField = 936;
944-
visitSingularInt32Field = 937;
945-
visitSingularInt64Field = 938;
946-
visitSingularMessageField = 939;
947-
visitSingularSFixed32Field = 940;
948-
visitSingularSFixed64Field = 941;
949-
visitSingularSInt32Field = 942;
950-
visitSingularSInt64Field = 943;
951-
visitSingularStringField = 944;
952-
visitSingularUInt32Field = 945;
953-
visitSingularUInt64Field = 946;
954-
visitUnknown = 947;
955-
wasDecoded = 948;
956-
weak = 949;
957-
weakDependency = 950;
958-
where = 951;
959-
wireFormat = 952;
960-
with = 953;
961-
withUnsafeBytes = 954;
962-
withUnsafeMutableBytes = 955;
963-
work = 956;
964-
Wrapped = 957;
965-
WrappedType = 958;
966-
wrappedValue = 959;
967-
written = 960;
968-
yday = 961;
896+
visitExtensionFields = 889;
897+
visitExtensionFieldsAsMessageSet = 890;
898+
visitMapField = 891;
899+
visitor = 892;
900+
visitPacked = 893;
901+
visitPackedBoolField = 894;
902+
visitPackedDoubleField = 895;
903+
visitPackedEnumField = 896;
904+
visitPackedFixed32Field = 897;
905+
visitPackedFixed64Field = 898;
906+
visitPackedFloatField = 899;
907+
visitPackedInt32Field = 900;
908+
visitPackedInt64Field = 901;
909+
visitPackedSFixed32Field = 902;
910+
visitPackedSFixed64Field = 903;
911+
visitPackedSInt32Field = 904;
912+
visitPackedSInt64Field = 905;
913+
visitPackedUInt32Field = 906;
914+
visitPackedUInt64Field = 907;
915+
visitRepeated = 908;
916+
visitRepeatedBoolField = 909;
917+
visitRepeatedBytesField = 910;
918+
visitRepeatedDoubleField = 911;
919+
visitRepeatedEnumField = 912;
920+
visitRepeatedFixed32Field = 913;
921+
visitRepeatedFixed64Field = 914;
922+
visitRepeatedFloatField = 915;
923+
visitRepeatedGroupField = 916;
924+
visitRepeatedInt32Field = 917;
925+
visitRepeatedInt64Field = 918;
926+
visitRepeatedMessageField = 919;
927+
visitRepeatedSFixed32Field = 920;
928+
visitRepeatedSFixed64Field = 921;
929+
visitRepeatedSInt32Field = 922;
930+
visitRepeatedSInt64Field = 923;
931+
visitRepeatedStringField = 924;
932+
visitRepeatedUInt32Field = 925;
933+
visitRepeatedUInt64Field = 926;
934+
visitSingular = 927;
935+
visitSingularBoolField = 928;
936+
visitSingularBytesField = 929;
937+
visitSingularDoubleField = 930;
938+
visitSingularEnumField = 931;
939+
visitSingularFixed32Field = 932;
940+
visitSingularFixed64Field = 933;
941+
visitSingularFloatField = 934;
942+
visitSingularGroupField = 935;
943+
visitSingularInt32Field = 936;
944+
visitSingularInt64Field = 937;
945+
visitSingularMessageField = 938;
946+
visitSingularSFixed32Field = 939;
947+
visitSingularSFixed64Field = 940;
948+
visitSingularSInt32Field = 941;
949+
visitSingularSInt64Field = 942;
950+
visitSingularStringField = 943;
951+
visitSingularUInt32Field = 944;
952+
visitSingularUInt64Field = 945;
953+
visitUnknown = 946;
954+
wasDecoded = 947;
955+
weak = 948;
956+
weakDependency = 949;
957+
where = 950;
958+
wireFormat = 951;
959+
with = 952;
960+
withUnsafeBytes = 953;
961+
withUnsafeMutableBytes = 954;
962+
work = 955;
963+
Wrapped = 956;
964+
WrappedType = 957;
965+
wrappedValue = 958;
966+
written = 959;
967+
yday = 960;
969968
}

Protos/SwiftProtobufTests/generated_swift_names_enums.proto

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,6 @@ message GeneratedSwiftReservedEnums {
892892
enum VerificationState { NONE_VerificationState = 0; }
893893
enum Version { NONE_Version = 0; }
894894
enum versionString { NONE_versionString = 0; }
895-
enum visitDefaultValues { NONE_visitDefaultValues = 0; }
896895
enum visitExtensionFields { NONE_visitExtensionFields = 0; }
897896
enum visitExtensionFieldsAsMessageSet { NONE_visitExtensionFieldsAsMessageSet = 0; }
898897
enum visitMapField { NONE_visitMapField = 0; }

Protos/SwiftProtobufTests/generated_swift_names_fields.proto

Lines changed: 72 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -892,77 +892,76 @@ message GeneratedSwiftReservedFields {
892892
int32 VerificationState = 886;
893893
int32 Version = 887;
894894
int32 versionString = 888;
895-
int32 visitDefaultValues = 889;
896-
int32 visitExtensionFields = 890;
897-
int32 visitExtensionFieldsAsMessageSet = 891;
898-
int32 visitMapField = 892;
899-
int32 visitor = 893;
900-
int32 visitPacked = 894;
901-
int32 visitPackedBoolField = 895;
902-
int32 visitPackedDoubleField = 896;
903-
int32 visitPackedEnumField = 897;
904-
int32 visitPackedFixed32Field = 898;
905-
int32 visitPackedFixed64Field = 899;
906-
int32 visitPackedFloatField = 900;
907-
int32 visitPackedInt32Field = 901;
908-
int32 visitPackedInt64Field = 902;
909-
int32 visitPackedSFixed32Field = 903;
910-
int32 visitPackedSFixed64Field = 904;
911-
int32 visitPackedSInt32Field = 905;
912-
int32 visitPackedSInt64Field = 906;
913-
int32 visitPackedUInt32Field = 907;
914-
int32 visitPackedUInt64Field = 908;
915-
int32 visitRepeated = 909;
916-
int32 visitRepeatedBoolField = 910;
917-
int32 visitRepeatedBytesField = 911;
918-
int32 visitRepeatedDoubleField = 912;
919-
int32 visitRepeatedEnumField = 913;
920-
int32 visitRepeatedFixed32Field = 914;
921-
int32 visitRepeatedFixed64Field = 915;
922-
int32 visitRepeatedFloatField = 916;
923-
int32 visitRepeatedGroupField = 917;
924-
int32 visitRepeatedInt32Field = 918;
925-
int32 visitRepeatedInt64Field = 919;
926-
int32 visitRepeatedMessageField = 920;
927-
int32 visitRepeatedSFixed32Field = 921;
928-
int32 visitRepeatedSFixed64Field = 922;
929-
int32 visitRepeatedSInt32Field = 923;
930-
int32 visitRepeatedSInt64Field = 924;
931-
int32 visitRepeatedStringField = 925;
932-
int32 visitRepeatedUInt32Field = 926;
933-
int32 visitRepeatedUInt64Field = 927;
934-
int32 visitSingular = 928;
935-
int32 visitSingularBoolField = 929;
936-
int32 visitSingularBytesField = 930;
937-
int32 visitSingularDoubleField = 931;
938-
int32 visitSingularEnumField = 932;
939-
int32 visitSingularFixed32Field = 933;
940-
int32 visitSingularFixed64Field = 934;
941-
int32 visitSingularFloatField = 935;
942-
int32 visitSingularGroupField = 936;
943-
int32 visitSingularInt32Field = 937;
944-
int32 visitSingularInt64Field = 938;
945-
int32 visitSingularMessageField = 939;
946-
int32 visitSingularSFixed32Field = 940;
947-
int32 visitSingularSFixed64Field = 941;
948-
int32 visitSingularSInt32Field = 942;
949-
int32 visitSingularSInt64Field = 943;
950-
int32 visitSingularStringField = 944;
951-
int32 visitSingularUInt32Field = 945;
952-
int32 visitSingularUInt64Field = 946;
953-
int32 visitUnknown = 947;
954-
int32 wasDecoded = 948;
955-
int32 weak = 949;
956-
int32 weakDependency = 950;
957-
int32 where = 951;
958-
int32 wireFormat = 952;
959-
int32 with = 953;
960-
int32 withUnsafeBytes = 954;
961-
int32 withUnsafeMutableBytes = 955;
962-
int32 work = 956;
963-
int32 Wrapped = 957;
964-
int32 WrappedType = 958;
965-
int32 wrappedValue = 959;
966-
int32 written = 960;
967-
int32 yday = 961;
895+
int32 visitExtensionFields = 889;
896+
int32 visitExtensionFieldsAsMessageSet = 890;
897+
int32 visitMapField = 891;
898+
int32 visitor = 892;
899+
int32 visitPacked = 893;
900+
int32 visitPackedBoolField = 894;
901+
int32 visitPackedDoubleField = 895;
902+
int32 visitPackedEnumField = 896;
903+
int32 visitPackedFixed32Field = 897;
904+
int32 visitPackedFixed64Field = 898;
905+
int32 visitPackedFloatField = 899;
906+
int32 visitPackedInt32Field = 900;
907+
int32 visitPackedInt64Field = 901;
908+
int32 visitPackedSFixed32Field = 902;
909+
int32 visitPackedSFixed64Field = 903;
910+
int32 visitPackedSInt32Field = 904;
911+
int32 visitPackedSInt64Field = 905;
912+
int32 visitPackedUInt32Field = 906;
913+
int32 visitPackedUInt64Field = 907;
914+
int32 visitRepeated = 908;
915+
int32 visitRepeatedBoolField = 909;
916+
int32 visitRepeatedBytesField = 910;
917+
int32 visitRepeatedDoubleField = 911;
918+
int32 visitRepeatedEnumField = 912;
919+
int32 visitRepeatedFixed32Field = 913;
920+
int32 visitRepeatedFixed64Field = 914;
921+
int32 visitRepeatedFloatField = 915;
922+
int32 visitRepeatedGroupField = 916;
923+
int32 visitRepeatedInt32Field = 917;
924+
int32 visitRepeatedInt64Field = 918;
925+
int32 visitRepeatedMessageField = 919;
926+
int32 visitRepeatedSFixed32Field = 920;
927+
int32 visitRepeatedSFixed64Field = 921;
928+
int32 visitRepeatedSInt32Field = 922;
929+
int32 visitRepeatedSInt64Field = 923;
930+
int32 visitRepeatedStringField = 924;
931+
int32 visitRepeatedUInt32Field = 925;
932+
int32 visitRepeatedUInt64Field = 926;
933+
int32 visitSingular = 927;
934+
int32 visitSingularBoolField = 928;
935+
int32 visitSingularBytesField = 929;
936+
int32 visitSingularDoubleField = 930;
937+
int32 visitSingularEnumField = 931;
938+
int32 visitSingularFixed32Field = 932;
939+
int32 visitSingularFixed64Field = 933;
940+
int32 visitSingularFloatField = 934;
941+
int32 visitSingularGroupField = 935;
942+
int32 visitSingularInt32Field = 936;
943+
int32 visitSingularInt64Field = 937;
944+
int32 visitSingularMessageField = 938;
945+
int32 visitSingularSFixed32Field = 939;
946+
int32 visitSingularSFixed64Field = 940;
947+
int32 visitSingularSInt32Field = 941;
948+
int32 visitSingularSInt64Field = 942;
949+
int32 visitSingularStringField = 943;
950+
int32 visitSingularUInt32Field = 944;
951+
int32 visitSingularUInt64Field = 945;
952+
int32 visitUnknown = 946;
953+
int32 wasDecoded = 947;
954+
int32 weak = 948;
955+
int32 weakDependency = 949;
956+
int32 where = 950;
957+
int32 wireFormat = 951;
958+
int32 with = 952;
959+
int32 withUnsafeBytes = 953;
960+
int32 withUnsafeMutableBytes = 954;
961+
int32 work = 955;
962+
int32 Wrapped = 956;
963+
int32 WrappedType = 957;
964+
int32 wrappedValue = 958;
965+
int32 written = 959;
966+
int32 yday = 960;
968967
}

Protos/SwiftProtobufTests/generated_swift_names_messages.proto

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,6 @@ message GeneratedSwiftReservedMessages {
892892
message VerificationState { int32 VerificationState = 1; }
893893
message Version { int32 Version = 1; }
894894
message versionString { int32 versionString = 1; }
895-
message visitDefaultValues { int32 visitDefaultValues = 1; }
896895
message visitExtensionFields { int32 visitExtensionFields = 1; }
897896
message visitExtensionFieldsAsMessageSet { int32 visitExtensionFieldsAsMessageSet = 1; }
898897
message visitMapField { int32 visitMapField = 1; }

Sources/SwiftProtobuf/Visitor.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,6 @@ public struct TraversalOptions {
461461
/// - singular message and group fields: Will be visited only if they are set.
462462
/// - singular primitive fields: Will always be visited under proto2. Under proto3 unset optional primitive fields will not be visited.
463463
public var alwaysVisitPrimitiveFields: Bool
464-
465-
public var visitDefaultValues: Bool {
466-
alwaysVisitPrimitiveFields
467-
}
468464

469465
public init(alwaysVisitPrimitiveFields: Bool = false) {
470466
self.alwaysVisitPrimitiveFields = alwaysVisitPrimitiveFields

0 commit comments

Comments
 (0)