flexible-polyline icon indicating copy to clipboard operation
flexible-polyline copied to clipboard

Update flexpolyline.h

Open oyefremov opened this issue 4 years ago • 1 comments

Function MUST write to out parameter on success, it was missing for last return true. On the other hand we must never reach this line on a valid data. In can happens only when decoding empty string.

Suggested test:

TEST(decode_unsigned_varint, empty_string){ uint32_t index = 0; int64_t result = 123456789; // initialized with random data EXPECT_FALSE(decode_unsigned_varint("", index, 0, result); EXPECT_EQ(index, 0); EXPECT_EQ(result, 123456789); // no writes to result on failure }

oyefremov avatar Feb 18 '21 08:02 oyefremov

Would the full re-write https://github.com/heremaps/flexible-polyline/pull/38 also address your problems?

VeaaC avatar Feb 19 '21 09:02 VeaaC

Closing this, as the C++ implementation has been completely rewritten since then

VeaaC avatar Apr 25 '24 08:04 VeaaC