mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kimgio: minor raw plugin review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
b8834c9cdd
commit
e400b6841e
1 changed files with 5 additions and 5 deletions
|
@ -116,17 +116,17 @@ INT64 RAWDataStream::size()
|
||||||
|
|
||||||
int RAWDataStream::get_char()
|
int RAWDataStream::get_char()
|
||||||
{
|
{
|
||||||
char ch = 0;
|
char result = 0;
|
||||||
if (!m_device->getChar(&ch)) {
|
if (!m_device->getChar(&result)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return static_cast<uchar>(ch);
|
return static_cast<uchar>(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
char* RAWDataStream::gets(char* rawbuffer, int rawsize)
|
char* RAWDataStream::gets(char* rawbuffer, int rawsize)
|
||||||
{
|
{
|
||||||
const qint64 readresult = m_device->readLine(rawbuffer, rawsize);
|
const qint64 result = m_device->readLine(rawbuffer, rawsize);
|
||||||
if (readresult > 0) {
|
if (result > 0) {
|
||||||
return rawbuffer;
|
return rawbuffer;
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
Loading…
Add table
Reference in a new issue