Skip to content
Snippets Groups Projects
Commit cf7b3e97 authored by Antti Soininen's avatar Antti Soininen
Browse files

Code beautification. Re #24355

parent b13e81de
No related branches found
No related tags found
No related merge requests found
...@@ -130,7 +130,8 @@ void WorkspaceFactoryImpl::initializeFromParent( ...@@ -130,7 +130,8 @@ void WorkspaceFactoryImpl::initializeFromParent(
for (size_t i = 0; i < parent.m_axes.size(); ++i) { for (size_t i = 0; i < parent.m_axes.size(); ++i) {
const bool isBinEdge = const bool isBinEdge =
dynamic_cast<const BinEdgeAxis *const>(parent.m_axes[i]) != nullptr; dynamic_cast<const BinEdgeAxis *const>(parent.m_axes[i]) != nullptr;
const size_t newAxisLength = child.m_axes[i]->length() + (isBinEdge ? 1 : 0); const size_t newAxisLength =
child.m_axes[i]->length() + (isBinEdge ? 1 : 0);
const size_t oldAxisLength = parent.m_axes[i]->length(); const size_t oldAxisLength = parent.m_axes[i]->length();
if (!differentSize && newAxisLength == oldAxisLength) { if (!differentSize && newAxisLength == oldAxisLength) {
......
...@@ -144,8 +144,7 @@ IndexSet<T>::IndexSet(const std::vector<size_t> &indices, size_t fullRange) ...@@ -144,8 +144,7 @@ IndexSet<T>::IndexSet(const std::vector<size_t> &indices, size_t fullRange)
/** /**
* Check if the index range is contiguous and in ascending order. * Check if the index range is contiguous and in ascending order.
*/ */
template <class T> template <class T> bool IndexSet<T>::isContiguous() const noexcept {
bool IndexSet<T>::isContiguous() const noexcept {
if (!m_isRange || m_indices.size() > 1) { if (!m_isRange || m_indices.size() > 1) {
for (size_t i = 0; i < m_indices.size() - 1; ++i) { for (size_t i = 0; i < m_indices.size() - 1; ++i) {
if (m_indices[i] + 1 != m_indices[i + 1]) { if (m_indices[i] + 1 != m_indices[i + 1]) {
......
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