mirror of
https://github.com/red0124/ssp.git
synced 2025-01-23 04:55:20 +01:00
Remove usage of ftell when updating cursor position value
This commit is contained in:
parent
67ef6651c1
commit
7f53b585f9
@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project(
|
||||
ssp
|
||||
VERSION 1.7.1
|
||||
VERSION 1.7.2
|
||||
DESCRIPTION "csv parser"
|
||||
HOMEPAGE_URL "https://github.com/red0124/ssp"
|
||||
LANGUAGES CXX
|
||||
|
@ -129,7 +129,7 @@ std::tuple<ssize_t, bool> get_line(char*& buffer, size_t& buffer_size,
|
||||
ssize_t ssize;
|
||||
if (file) {
|
||||
ssize = get_line_file(buffer, buffer_size, file);
|
||||
curr_char = std::ftell(file);
|
||||
curr_char += ssize;
|
||||
} else {
|
||||
ssize = get_line_buffer(buffer, buffer_size, csv_data_buffer,
|
||||
csv_data_size, curr_char);
|
||||
|
@ -6,7 +6,7 @@ project(
|
||||
'cpp_std=c++17',
|
||||
'buildtype=debugoptimized',
|
||||
'wrap_mode=forcefallback'],
|
||||
version: '1.7.1',
|
||||
version: '1.7.2',
|
||||
meson_version:'>=0.54.0')
|
||||
|
||||
fast_float_dep = dependency('fast_float')
|
||||
|
2
ssp.hpp
2
ssp.hpp
@ -741,7 +741,7 @@ std::tuple<ssize_t, bool> get_line(char*& buffer, size_t& buffer_size,
|
||||
ssize_t ssize;
|
||||
if (file) {
|
||||
ssize = get_line_file(buffer, buffer_size, file);
|
||||
curr_char = std::ftell(file);
|
||||
curr_char += ssize;
|
||||
} else {
|
||||
ssize = get_line_buffer(buffer, buffer_size, csv_data_buffer,
|
||||
csv_data_size, curr_char);
|
||||
|
Loading…
Reference in New Issue
Block a user