[gnumeric] Stf: simplify.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Stf: simplify.
- Date: Tue, 10 May 2016 23:34:16 +0000 (UTC)
commit f446e713bdb87be34c428a8b4af7cf05929b633d
Author: Morten Welinder <terra gnome org>
Date: Tue May 10 19:33:09 2016 -0400
Stf: simplify.
src/stf-parse.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/stf-parse.c b/src/stf-parse.c
index a8fd5cb..54271c0 100644
--- a/src/stf-parse.c
+++ b/src/stf-parse.c
@@ -1394,6 +1394,7 @@ stf_parse_region (StfParseOptions_t *parseoptions, char const *data, char const
unsigned int row, colhigh = 0;
GStringChunk *lines_chunk;
GPtrArray *lines;
+ size_t nformats;
SETUP_LOCALE_SWITCH;
@@ -1408,6 +1409,7 @@ stf_parse_region (StfParseOptions_t *parseoptions, char const *data, char const
data_end = data + strlen (data);
lines_chunk = g_string_chunk_new (100 * 1024);
lines = stf_parse_general (parseoptions, lines_chunk, data, data_end);
+ nformats = parseoptions->formats->len;
for (row = 0; row < lines->len; row++) {
GPtrArray *line = g_ptr_array_index (lines, row);
unsigned int col, targetcol = 0;
@@ -1421,7 +1423,7 @@ stf_parse_region (StfParseOptions_t *parseoptions, char const *data, char const
GnmValue *v;
GnmCellCopy *cc;
- if (col < parseoptions->formats->len)
+ if (col < nformats)
fmt = g_ptr_array_index (parseoptions->formats, col);
v = format_match (text, fmt, date_conv);
if (!v)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]