Skip to content

Commit a2df8f4

Browse files
committed
Refactor PartitionsSaxHandler to use boost::json
Previously it was based on rapidjson The tests are adjusted accordingly. Relates-To: OCMAM-448 Signed-off-by: Alexander Sopov <ext-alexander.sopov@here.com>
1 parent 8321fef commit a2df8f4

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

olp-cpp-sdk-dataservice-read/src/repositories/AsyncJsonStream.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ boost::json::string_view RapidJsonByteStream::ReadView() {
3535
if (ReadEmpty()) {
3636
SwapBuffers();
3737
}
38-
auto terminator_it =
39-
std::find(read_buffer_.begin() + count_, read_buffer_.end(), '\0');
4038
auto begin = read_buffer_.begin() + count_;
41-
boost::core::basic_string_view<char>::size_type size =
39+
auto terminator_it = std::find(begin, read_buffer_.end(), '\0');
40+
boost::json::string_view::size_type size =
4241
std::distance(begin, terminator_it);
4342
count_ += size;
4443
full_count_ += size;

olp-cpp-sdk-dataservice-read/src/repositories/PartitionsRepository.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,6 @@ client::ApiNoResponse PartitionsRepository::ParsePartitionsStream(
660660

661661
auto reader_cancellation_token =
662662
client::CancellationToken([parser, &async_stream]() {
663-
// partitions_handler->Abort();
664663
parser->handler().Abort();
665664
async_stream->CloseStream(client::ApiError::Cancelled());
666665
});

0 commit comments

Comments
 (0)