Skip to content

Commit

Permalink
Fix tensorflow::data::model::SharedStatefield initializer order to av…
Browse files Browse the repository at this point in the history
…oid warnings.

The fields will be initiwalized in the order in which they are declared in the struct
regardless of the order the initializers are listed, but some compilers warn if the orderings do not match.
This CL makes tham match to avoid the warnings.

PiperOrigin-RevId: 218922131
  • Loading branch information
tensorflower-gardener committed Oct 26, 2018
1 parent 68cec25 commit 5dd59f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensorflow/core/framework/model.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct SharedState {
public:
explicit SharedState(int64 value, std::shared_ptr<mutex> mu,
std::shared_ptr<condition_variable> cond_var)
: value(value), mu(std::move(mu)), cond_var(std::move(cond_var)) {}
: mu(std::move(mu)), cond_var(std::move(cond_var)), value(value) {}

std::shared_ptr<mutex> mu;
std::shared_ptr<condition_variable> cond_var;
Expand Down

0 comments on commit 5dd59f4

Please sign in to comment.