mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 12:44:42 +03:00
Avoid magic constant
This commit is contained in:
@@ -3565,7 +3565,7 @@ The language guarantees that a `T&` refers to an object, so that testing for `nu
|
|||||||
array<wheel, 4> w;
|
array<wheel, 4> w;
|
||||||
// ...
|
// ...
|
||||||
public:
|
public:
|
||||||
wheel& get_wheel(size_t i) { Expects(i < 4); return w[i]; }
|
wheel& get_wheel(size_t i) { Expects(i < w.size()); return w[i]; }
|
||||||
// ...
|
// ...
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user