File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -107,15 +107,15 @@ std::string DecompressGzip(const std::string& filename) {
107
107
void FixOlderWeightsFile (WeightsFile* file) {
108
108
using nf = pblczero::NetworkFormat;
109
109
auto network_format = file->format ().network_format ().network ();
110
- if ( file->format ().has_network_format () &&
111
- network_format != nf::NETWORK_CLASSICAL &&
110
+ const auto has_network_format = file->format ().has_network_format ();
111
+ if (has_network_format && network_format != nf::NETWORK_CLASSICAL &&
112
112
network_format != nf::NETWORK_SE) {
113
113
// Already in a new format, return unchanged.
114
114
return ;
115
115
}
116
116
117
117
auto * net = file->mutable_format ()->mutable_network_format ();
118
- if (!file-> format (). has_network_format () ) {
118
+ if (!has_network_format) {
119
119
// Older protobufs don't have format definition.
120
120
net->set_input (nf::INPUT_CLASSICAL_112_PLANE);
121
121
net->set_output (nf::OUTPUT_CLASSICAL);
You can’t perform that action at this time.
0 commit comments