Skip to content
Snippets Groups Projects
Commit e0ee3aa0 authored by Oliver Sander's avatar Oliver Sander Committed by sander@FU-BERLIN.DE
Browse files

add range checks

[[Imported from SVN: r8862]]
parent d91d2cf2
No related branches found
No related tags found
No related merge requests found
......@@ -40,17 +40,21 @@ public:
default:
assert(false);
}
// Make compiler happy even if NDEBUG is set
return 0;
}
/** \brief Direct access to individual entries */
T& operator()(size_t i, size_t j, size_t k)
{
assert(i<N1 && j<N2 && k<N3_);
return data_[i][j][k];
}
/** \brief Direct const access to individual entries */
const T& operator()(size_t i, size_t j, size_t k) const
{
assert(i<N1 && j<N2 && k<N3_);
return data_[i][j][k];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment