mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
libstdc++ and libc++ both work now
This commit is contained in:
@@ -65,43 +65,21 @@ public:
|
||||
while(input.good() && i < size) {
|
||||
c = input.get();
|
||||
|
||||
if (input.good()) {
|
||||
if (!input.fail()) {
|
||||
if (m_masking_index >= 0) {
|
||||
c = c ^ m_masking_key[(m_masking_index++)%4];
|
||||
}
|
||||
|
||||
m_payload.push_back(c);
|
||||
i++;
|
||||
} else if (input.eof()) {
|
||||
break;
|
||||
} else {
|
||||
}
|
||||
|
||||
if (input.bad()) {
|
||||
throw processor::exception("istream read error 2",
|
||||
processor::error::FATAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/*for (i = 0; i < size; ++i) {
|
||||
if (input.good()) {
|
||||
c = input.get();
|
||||
|
||||
if (input.fail()) {
|
||||
throw processor::exception("istream read error",
|
||||
processor::error::FATAL_ERROR);
|
||||
}
|
||||
|
||||
if (m_masking_index >= 0) {
|
||||
c = c ^ m_masking_key[(m_masking_index++)%4];
|
||||
}
|
||||
|
||||
m_payload.push_back(c);
|
||||
|
||||
} else if (input.eof()) {
|
||||
break;
|
||||
} else {
|
||||
throw processor::exception("istream read error",processor::error::FATAL_ERROR);
|
||||
}
|
||||
}*/
|
||||
|
||||
// successfully read all bytes
|
||||
return i;
|
||||
}
|
||||
|
||||
@@ -62,44 +62,21 @@ uint64_t data::process_payload(std::istream& input,uint64_t size) {
|
||||
));
|
||||
}
|
||||
|
||||
// extract characters until size have been extracted or eof. return num ext
|
||||
i = 0;
|
||||
while(input.good() && i < size) {
|
||||
c = input.get();
|
||||
|
||||
if (input.good()) {
|
||||
if (!input.fail()) {
|
||||
process_character(c);
|
||||
i++;
|
||||
} else if (input.eof()) {
|
||||
break;
|
||||
} else {
|
||||
}
|
||||
|
||||
if (input.bad()) {
|
||||
throw processor::exception("istream read error 2",
|
||||
processor::error::FATAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/*for (i = 0; i < size; ++i) {
|
||||
if (input.good()) {
|
||||
c = input.get();
|
||||
process_character(c);
|
||||
|
||||
if (input.eof()) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (input.fail()) {
|
||||
throw processor::exception("istream read error 1",
|
||||
processor::error::FATAL_ERROR);
|
||||
}
|
||||
|
||||
} else if (input.eof()) {
|
||||
break;
|
||||
} else {
|
||||
throw processor::exception("istream read error 2",
|
||||
processor::error::FATAL_ERROR);
|
||||
}
|
||||
}*/
|
||||
|
||||
// successfully read all bytes
|
||||
return i;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user