Kaydet (Commit) e020cc88 authored tarafından Takeshi Abe's avatar Takeshi Abe Kaydeden (comit) Noel Grandin

toolkit: a micro-optimization taking min and max simulnateously

Change-Id: I161dd318b1e5729ef0b8c55a41c0eddc681b153f
Reviewed-on: https://gerrit.libreoffice.org/57612
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst e6878334
......@@ -404,8 +404,9 @@ private:
rDataRow[ columnIndex ].first = i_values[ col ];
}
sal_Int32 const firstAffectedColumn = *::std::min_element( i_columnIndexes.begin(), i_columnIndexes.end() );
sal_Int32 const lastAffectedColumn = *::std::max_element( i_columnIndexes.begin(), i_columnIndexes.end() );
auto aPair = ::std::minmax_element( i_columnIndexes.begin(), i_columnIndexes.end() );
sal_Int32 const firstAffectedColumn = *aPair.first;
sal_Int32 const lastAffectedColumn = *aPair.second;
broadcast(
GridDataEvent( *this, firstAffectedColumn, lastAffectedColumn, i_rowIndex, i_rowIndex ),
&XGridDataListener::dataChanged,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment