From 83a4f8032fbdad2ea35ef101dfb14433f672b6d9 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 29 May 2022 13:04:41 +0300 Subject: Autocommit at 29.05.2022 @ 13:04 --- src/Models/Table.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Models/Table.cpp') diff --git a/src/Models/Table.cpp b/src/Models/Table.cpp index 66edef4..afb77b1 100644 --- a/src/Models/Table.cpp +++ b/src/Models/Table.cpp @@ -30,10 +30,9 @@ void Table::putCell(unsigned row, unsigned col, const char* rawValue) { Cell* newCell; if (containsNumber(rawValue)) { - double intParse = atoi(rawValue); double doubleParse = atof(rawValue); - newCell = (abs(doubleParse) - abs(intParse) > 0.00001) + newCell = (abs(doubleParse) - (unsigned)(abs(doubleParse)) > 0.00001) ? (Cell*)new CellDouble(doubleParse) : (Cell*)new CellInt(intParse); } else { -- cgit v1.3.1-23-gd82d