Kaydet (Commit) fc7f66d0 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Simplify wwSprmSearcher further

Change-Id: Ib2d1d7665e5293c126eef5bde6177a88ecd5ce96
üst 3dd99122
...@@ -60,16 +60,20 @@ namespace SL ...@@ -60,16 +60,20 @@ namespace SL
struct SprmInfo struct SprmInfo
{ {
sal_uInt16 nId; ///< A ww8 sprm is hardcoded as 16bits
unsigned int nLen : 6; unsigned int nLen : 6;
unsigned int nVari : 2; unsigned int nVari : 2;
}; };
struct SprmInfoRow {
sal_uInt16 nId; ///< A ww8 sprm is hardcoded as 16bits
SprmInfo info;
};
class wwSprmSearcher { class wwSprmSearcher {
public: public:
wwSprmSearcher(SprmInfo const * infos, std::size_t size) { wwSprmSearcher(SprmInfoRow const * rows, std::size_t size) {
for (std::size_t i = 0; i != size; ++i) { for (std::size_t i = 0; i != size; ++i) {
bool ins = map_.insert(Map::value_type(infos[i].nId, infos[i])) bool ins = map_.insert(Map::value_type(rows[i].nId, rows[i].info))
.second; .second;
assert(ins); (void) ins; assert(ins); (void) ins;
} }
......
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