fix clang warning
This commit is contained in:
parent
4778d451d6
commit
dfe82a4181
@ -82,10 +82,11 @@ namespace rexy{
|
|||||||
}
|
}
|
||||||
rexy::string filerd::readln(size_t max)noexcept{
|
rexy::string filerd::readln(size_t max)noexcept{
|
||||||
rexy::string ret;
|
rexy::string ret;
|
||||||
char c;
|
int c;
|
||||||
size_t count = 0;
|
size_t count = 0;
|
||||||
for(c = fgetc(m_fp);c != EOF && c != '\n';c = fgetc(m_fp)){
|
for(c = fgetc(m_fp);c != EOF && c != '\n';c = fgetc(m_fp)){
|
||||||
ret.append(&c, 1);
|
char ch = c;
|
||||||
|
ret.append(&ch, 1);
|
||||||
if(++count == max)
|
if(++count == max)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user