Made Device::IsType 'const', because it is.

This commit is contained in:
Jonas 'Sortie' Termansen 2012-01-18 01:11:17 +01:00
parent 35fc0f6dfe
commit ba2cb5103a
5 changed files with 7 additions and 7 deletions

View File

@ -49,7 +49,7 @@ namespace Sortix
void Unref(); void Unref();
public: public:
virtual bool IsType(unsigned type) = 0; virtual bool IsType(unsigned type) const = 0;
}; };
} }

View File

@ -50,7 +50,7 @@ namespace Sortix
virtual int Read(sortix_dirent* dirent, size_t available) = 0; virtual int Read(sortix_dirent* dirent, size_t available) = 0;
public: public:
virtual bool IsType(unsigned type) { return type == Device::DIRECTORY; } virtual bool IsType(unsigned type) const { return type == Device::DIRECTORY; }
}; };

View File

@ -58,7 +58,7 @@ namespace Sortix
virtual bool Unlink(const char* path) = 0; virtual bool Unlink(const char* path) = 0;
public: public:
virtual bool IsType(unsigned type) { return type == Device::FILESYSTEM; } virtual bool IsType(unsigned type) const { return type == Device::FILESYSTEM; }
}; };

View File

@ -163,7 +163,7 @@ namespace Sortix
virtual ssize_t Write(const byte* src, size_t count); virtual ssize_t Write(const byte* src, size_t count);
virtual bool IsReadable(); virtual bool IsReadable();
virtual bool IsWritable(); virtual bool IsWritable();
virtual bool IsType(unsigned type); virtual bool IsType(unsigned type) const;
}; };
@ -199,7 +199,7 @@ namespace Sortix
return true; return true;
} }
bool DevLogTTY::IsType(unsigned type) bool DevLogTTY::IsType(unsigned type) const
{ {
return type == Device::TTY || BaseClass::IsType(type); return type == Device::TTY || BaseClass::IsType(type);
} }

View File

@ -35,7 +35,7 @@ namespace Sortix
typedef Device BaseClass; typedef Device BaseClass;
public: public:
virtual bool IsType(unsigned type) { return type == Device::STREAM; } virtual bool IsType(unsigned type) const { return type == Device::STREAM; }
public: public:
virtual ssize_t Read(byte* dest, size_t count) = 0; virtual ssize_t Read(byte* dest, size_t count) = 0;
@ -51,7 +51,7 @@ namespace Sortix
typedef DevStream BaseClass; typedef DevStream BaseClass;
public: public:
virtual bool IsType(unsigned type) virtual bool IsType(unsigned type) const
{ {
return type == Device::BUFFER || BaseClass::IsType(type); return type == Device::BUFFER || BaseClass::IsType(type);
} }