[tf.data] Avoid using designated initializer syntax in snapshot_util.cc.

This syntax was added to the standard in C++20 and is not supported in our Windows build.

PiperOrigin-RevId: 307642491
Change-Id: I3a7afa3f7f3024c6033d3277127bf96269f163fc
This commit is contained in:
Derek Murray 2020-04-21 11:13:47 -07:00 committed by TensorFlower Gardener
parent 2d3b485d0d
commit d515127fdd

View File

@ -402,16 +402,15 @@ Status Reader::MakeNestedDataset(Env* env,
datasets.reserve(filenames.size());
for (const auto& filename : filenames) {
datasets.push_back(new Dataset(
filename, compression_type, version, dtypes, shapes,
DatasetContext::Params{.type_string = "snapshot_util::Reader::Dataset",
.node_name = "snapshot_util_reader_Dataset"}));
datasets.push_back(
new Dataset(filename, compression_type, version, dtypes, shapes,
DatasetContext::Params({"snapshot_util::Reader::Dataset",
"snapshot_util_reader_Dataset"})));
}
*output = new NestedDataset(
datasets, DatasetContext::Params{
.type_string = "snapshot_util::Reader::NestedDataset",
.node_name = "snapshot_util_reader_NestedDataset"});
datasets, DatasetContext::Params({"snapshot_util::Reader::NestedDataset",
"snapshot_util_reader_NestedDataset"}));
return Status::OK();
}