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
This commit is contained in:
Stephan Bergmann
2015-04-16 16:18:27 +02:00
parent c1c309d37c
commit cf9d714f74

View File

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