"testing/python/vscode:/vscode.git/clone" did not exist on "91a7bb2be6b4229c978db69c89794fc937dc3ee4"
Commit c51bcdde authored by charlie's avatar charlie
Browse files

Use ternary operator

parent faefeef9
...@@ -419,32 +419,17 @@ const std::vector<shape::dynamic_dimension>& shape::dyn_dims() const { return im ...@@ -419,32 +419,17 @@ const std::vector<shape::dynamic_dimension>& shape::dyn_dims() const { return im
std::vector<std::size_t> shape::min_lens() const std::vector<std::size_t> shape::min_lens() const
{ {
if(not this->dynamic()) return this->dynamic() ? impl->min_lens() : this->lens();
{
return this->lens();
}
return impl->min_lens();
;
} }
std::vector<std::size_t> shape::max_lens() const std::vector<std::size_t> shape::max_lens() const
{ {
if(not this->dynamic()) return this->dynamic() ? impl->max_lens() : this->lens();
{
return this->lens();
}
return impl->max_lens();
;
} }
std::vector<std::size_t> shape::opt_lens() const std::vector<std::size_t> shape::opt_lens() const
{ {
if(not this->dynamic()) return this->dynamic() ? impl->opt_lens() : this->lens();
{
return this->lens();
}
return impl->opt_lens();
;
} }
bool shape::dynamic_dimension::is_fixed() const { return this->min == this->max; } bool shape::dynamic_dimension::is_fixed() const { return this->min == this->max; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment