Revert "use at() to get exceptions"

This reverts commit d91d5425d3f2b6ad9f1975c948e064faa4c251a4.
This commit is contained in:
2025-05-03 12:49:40 -05:00
parent a84ec50045
commit c718a9a186
2 changed files with 10 additions and 10 deletions

View File

@@ -40,10 +40,10 @@ public:
}
public:
Type& operator[](size_t x) {
return ref.data.at(ref.w * y + x);
return ref.data[ref.w * y + x];
}
const Type& operator[](size_t x) const {
return ref.data.at(ref.w * y + x);
return ref.data[ref.w * y + x];
}
row_ref operator=(row_ref&& other) {
row_ref& me = *this;
@@ -94,10 +94,10 @@ public:
}
public:
Type& operator[](size_t y) {
return ref.data.at(ref.w * y + x);
return ref.data[ref.w * y + x];
}
const Type& operator[](size_t y) const {
return ref.data.at(ref.w * y + x);
return ref.data[ref.w * y + x];
}
col_ref operator=(col_ref&& other) {
col_ref& me = *this;
@@ -139,7 +139,7 @@ public:
const_row_ref(const vector2d<Type, Alloc>& ref, size_t row) : ref(ref), y(row) {}
public:
const Type& operator[](size_t x) const {
return ref.data.at(ref.w * y + x);
return ref.data[ref.w * y + x];
}
};
class const_col_ref {
@@ -149,7 +149,7 @@ public:
const_col_ref(const vector2d<Type, Alloc>& ref, size_t col) : ref(ref), x(col) {}
public:
const Type& operator[](size_t y) const {
return ref.data.at(ref.w * y + x);
return ref.data[ref.w * y + x];
}
};
col_ref operator[](size_t x) {