[easytag] Use TagLib namespace for ulong typedef
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Use TagLib namespace for ulong typedef
- Date: Fri, 11 Apr 2014 20:59:22 +0000 (UTC)
commit a9b66c883f6eee2759d0a2aa418463af76788aec
Author: David King <amigadave amigadave com>
Date: Fri Apr 11 21:55:56 2014 +0100
Use TagLib namespace for ulong typedef
Under MinGW, ulong is not defined.
src/gio_wrapper.cc | 18 ++++++++++--------
src/gio_wrapper.h | 12 ++++++------
2 files changed, 16 insertions(+), 14 deletions(-)
---
diff --git a/src/gio_wrapper.cc b/src/gio_wrapper.cc
index 3fd8a9f..9599494 100644
--- a/src/gio_wrapper.cc
+++ b/src/gio_wrapper.cc
@@ -43,7 +43,7 @@ GIO_InputStream::name () const
}
TagLib::ByteVector
-GIO_InputStream::readBlock (ulong length)
+GIO_InputStream::readBlock (TagLib::ulong length)
{
if (error)
{
@@ -65,13 +65,15 @@ GIO_InputStream::writeBlock (TagLib::ByteVector const &data)
}
void
-GIO_InputStream::insert (TagLib::ByteVector const &data, ulong start, ulong replace)
+GIO_InputStream::insert (TagLib::ByteVector const &data,
+ TagLib::ulong start,
+ TagLib::ulong replace)
{
g_warning ("%s", "Trying to write to read-only file!");
}
void
-GIO_InputStream::removeBlock (ulong start, ulong length)
+GIO_InputStream::removeBlock (TagLib::ulong start, TagLib::ulong length)
{
g_warning ("%s", "Trying to write to read-only file!");
}
@@ -195,7 +197,7 @@ GIO_IOStream::name () const
}
TagLib::ByteVector
-GIO_IOStream::readBlock (ulong length)
+GIO_IOStream::readBlock (TagLib::ulong length)
{
if (error)
{
@@ -229,8 +231,8 @@ GIO_IOStream::writeBlock (TagLib::ByteVector const &data)
void
GIO_IOStream::insert (TagLib::ByteVector const &data,
- ulong start,
- ulong replace)
+ TagLib::ulong start,
+ TagLib::ulong replace)
{
if (error)
{
@@ -340,9 +342,9 @@ GIO_IOStream::insert (TagLib::ByteVector const &data,
}
void
-GIO_IOStream::removeBlock (ulong start, ulong len)
+GIO_IOStream::removeBlock (TagLib::ulong start, TagLib::ulong len)
{
- if (start + len >= (ulong)length ())
+ if (start + len >= (TagLib::ulong)length ())
{
truncate (start);
return;
diff --git a/src/gio_wrapper.h b/src/gio_wrapper.h
index cd7f61d..dc6c9da 100644
--- a/src/gio_wrapper.h
+++ b/src/gio_wrapper.h
@@ -29,10 +29,10 @@ public:
GIO_InputStream (GFile *file_);
virtual ~GIO_InputStream ();
virtual TagLib::FileName name () const;
- virtual TagLib::ByteVector readBlock (ulong length);
+ virtual TagLib::ByteVector readBlock (TagLib::ulong length);
virtual void writeBlock (TagLib::ByteVector const &data);
- virtual void insert (TagLib::ByteVector const &data, ulong start = 0, ulong replace = 0);
- virtual void removeBlock (ulong start = 0, ulong length = 0);
+ virtual void insert (TagLib::ByteVector const &data, TagLib::ulong start = 0, TagLib::ulong replace = 0);
+ virtual void removeBlock (TagLib::ulong start = 0, TagLib::ulong length = 0);
virtual bool readOnly () const;
virtual bool isOpen () const;
virtual void seek (long int offset, TagLib::IOStream::Position p = TagLib::IOStream::Beginning);
@@ -57,10 +57,10 @@ public:
GIO_IOStream (GFile *file_);
virtual ~GIO_IOStream ();
virtual TagLib::FileName name () const;
- virtual TagLib::ByteVector readBlock (ulong length);
+ virtual TagLib::ByteVector readBlock (TagLib::ulong length);
virtual void writeBlock (TagLib::ByteVector const &data);
- virtual void insert (TagLib::ByteVector const &data, ulong start = 0, ulong replace = 0);
- virtual void removeBlock (ulong start = 0, ulong len = 0);
+ virtual void insert (TagLib::ByteVector const &data, TagLib::ulong start = 0, TagLib::ulong replace = 0);
+ virtual void removeBlock (TagLib::ulong start = 0, TagLib::ulong len = 0);
virtual bool readOnly () const;
virtual bool isOpen () const;
virtual void seek (long int offset, TagLib::IOStream::Position p = TagLib::IOStream::Beginning);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]