1 #ifndef DYNAMIC_DEPTH_INTERNAL_DYNAMIC_DEPTH_DIMENSION_H_ // NOLINT 2 #define DYNAMIC_DEPTH_INTERNAL_DYNAMIC_DEPTH_DIMENSION_H_ // NOLINT 3 4 namespace dynamic_depth { 5 6 // A struct that contains the width and height of a size or the x and y 7 // coordinates of a point. 8 struct Dimension { DimensionDimension9 Dimension(int w, int h) : width(w), height(h) {} 10 int width; 11 int height; 12 13 inline bool operator==(const Dimension& other) const { 14 return width == other.width && height == other.height; 15 } 16 17 inline bool operator!=(const Dimension& other) const { 18 return !(*this == other); 19 } 20 }; 21 22 } // namespace dynamic_depth 23 24 #endif // DYNAMIC_DEPTH_INTERNAL_DYNAMIC_DEPTH_DIMENSION_H_ // NOLINT 25