Skip to content

Commit 763b262

Browse files
committed
Linting and handle compiler error on cygwin
1 parent 64b0d69 commit 763b262

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/test_decwide_t_algebra_edge.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,19 +1182,19 @@ auto test_string_ops_and_round_trips() -> bool
11821182
}
11831183

11841184
{
1185-
std::string str_zeros(std::string("000.000000"));
1185+
auto str_zeros { std::string("000.000000") };
11861186

11871187
for(auto i = static_cast<unsigned>(UINT8_C(0)); i < static_cast<unsigned>(UINT8_C(16)); ++i)
11881188
{
11891189
const bool zero_is_neg { ((i % static_cast<unsigned>(UINT8_C(2))) != static_cast<unsigned>(UINT8_C(0))) };
11901190

11911191
str_zeros.push_back('0');
1192-
str_zeros.insert(str_zeros.cbegin(), '0');
1192+
str_zeros = "0" + str_zeros;
11931193

11941194
std::string str_local_zero_to_read { str_zeros };
11951195

1196-
if(!zero_is_neg) { str_local_zero_to_read.insert(str_local_zero_to_read.cbegin(), '+'); }
1197-
else { str_local_zero_to_read.insert(str_local_zero_to_read.cbegin(), '-'); }
1196+
if(!zero_is_neg) { str_local_zero_to_read = "+" + str_local_zero_to_read; }
1197+
else { str_local_zero_to_read = "-" + str_local_zero_to_read;; }
11981198

11991199
const local_wide_decimal_type val_local_zero_to_read { str_local_zero_to_read.c_str() };
12001200

0 commit comments

Comments
 (0)