mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Made Device::IsType 'const', because it is.
This commit is contained in:
parent
35fc0f6dfe
commit
ba2cb5103a
5 changed files with 7 additions and 7 deletions
|
@ -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;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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; }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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; }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue