Kaydet (Commit) 38a3d53d authored tarafından Takeshi Abe's avatar Takeshi Abe Kaydeden (comit) David Tardon

fdo#75757: remove inheritance to std::vector

Change-Id: I04a5832c86823718146c78238ea648be21bf1f53
Reviewed-on: https://gerrit.libreoffice.org/10811Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst 73a31771
...@@ -155,12 +155,16 @@ struct NWFWidgetData ...@@ -155,12 +155,16 @@ struct NWFWidgetData
// easily and quickly reset each to a default state before using // easily and quickly reset each to a default state before using
// them // them
static boost::unordered_map<long, guint> gWidgetDefaultFlags; static boost::unordered_map<long, guint> gWidgetDefaultFlags;
class WidgetDataVector : public std::vector<NWFWidgetData> class WidgetDataVector
{ {
private:
std::vector<NWFWidgetData> mData;
public: public:
WidgetDataVector(size_t nElems = 0) : std::vector<NWFWidgetData>( nElems ) {} WidgetDataVector(size_t nElems = 0) : mData( nElems ) {}
NWFWidgetData &operator [](size_t i) { return at(i); } size_t size() const { return mData.size(); }
NWFWidgetData &operator [](const SalX11Screen &s) { return at(s.getXScreen()); } NWFWidgetData &operator [](size_t i) { return mData.at(i); }
NWFWidgetData &operator [](const SalX11Screen &s) { return mData.at(s.getXScreen()); }
}; };
static WidgetDataVector gWidgetData; static WidgetDataVector gWidgetData;
......
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