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

Use C++11 std::vector<T>::data()

...all uses of bytes::data() look like they're fine with std::vector<T>::data()
not necessarily returning nullptr when empty

Change-Id: I48c3877cfb9fb1a4a129bd1e072410a8bebc87b1
üst c1c309d3
...@@ -24,11 +24,7 @@ ...@@ -24,11 +24,7 @@
namespace ww namespace ww
{ {
class bytes : public std::vector<sal_uInt8> typedef std::vector<sal_uInt8> bytes;
{
public:
const sal_uInt8* data() const { return empty() ? 0 : &front(); }
};
enum WordVersion {eWW1 = 1, eWW2 = 2, eWW6 = 6, eWW7 = 7, eWW8 = 8}; enum WordVersion {eWW1 = 1, eWW2 = 2, eWW6 = 6, eWW7 = 7, eWW8 = 8};
inline bool IsSevenMinus(WordVersion eVer) { return eVer <= eWW7; } inline bool IsSevenMinus(WordVersion eVer) { return eVer <= eWW7; }
......
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