+ fix various warnings
This commit is contained in:
parent
13fa571c41
commit
cac09437c8
|
@ -105,14 +105,14 @@ Cell::Cell(const Cell &other)
|
||||||
, owner(other.owner)
|
, owner(other.owner)
|
||||||
, used(other.used)
|
, used(other.used)
|
||||||
, expression(other.expression ? other.expression->copy() : 0)
|
, expression(other.expression ? other.expression->copy() : 0)
|
||||||
, style(other.style)
|
|
||||||
, alignment(other.alignment)
|
, alignment(other.alignment)
|
||||||
|
, style(other.style)
|
||||||
, foregroundColor(other.foregroundColor)
|
, foregroundColor(other.foregroundColor)
|
||||||
, backgroundColor(other.backgroundColor)
|
, backgroundColor(other.backgroundColor)
|
||||||
, displayUnit(other.displayUnit)
|
, displayUnit(other.displayUnit)
|
||||||
, computedUnit(other.computedUnit)
|
, computedUnit(other.computedUnit)
|
||||||
, colSpan(other.colSpan)
|
|
||||||
, rowSpan(other.rowSpan)
|
, rowSpan(other.rowSpan)
|
||||||
|
, colSpan(other.colSpan)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -481,7 +481,7 @@ Expression * OperatorExpression::eval() const
|
||||||
NumberExpression * v1;
|
NumberExpression * v1;
|
||||||
std::auto_ptr<Expression> e2(right->eval());
|
std::auto_ptr<Expression> e2(right->eval());
|
||||||
NumberExpression * v2;
|
NumberExpression * v2;
|
||||||
NumberExpression * output;
|
NumberExpression * output = 0;
|
||||||
|
|
||||||
v1 = freecad_dynamic_cast<NumberExpression>(e1.get());
|
v1 = freecad_dynamic_cast<NumberExpression>(e1.get());
|
||||||
v2 = freecad_dynamic_cast<NumberExpression>(e2.get());
|
v2 = freecad_dynamic_cast<NumberExpression>(e2.get());
|
||||||
|
@ -877,7 +877,7 @@ Expression * FunctionExpression::eval() const
|
||||||
std::auto_ptr<Expression> e2(args.size() > 1 ? args[1]->eval() : 0);
|
std::auto_ptr<Expression> e2(args.size() > 1 ? args[1]->eval() : 0);
|
||||||
NumberExpression * v1 = freecad_dynamic_cast<NumberExpression>(e1.get());
|
NumberExpression * v1 = freecad_dynamic_cast<NumberExpression>(e1.get());
|
||||||
NumberExpression * v2 = freecad_dynamic_cast<NumberExpression>(e2.get());
|
NumberExpression * v2 = freecad_dynamic_cast<NumberExpression>(e2.get());
|
||||||
double output;
|
double output = 0;
|
||||||
Unit unit;
|
Unit unit;
|
||||||
double scaler = 1;
|
double scaler = 1;
|
||||||
|
|
||||||
|
|
|
@ -203,9 +203,9 @@ PropertySheet::PropertySheet(Sheet *_owner)
|
||||||
}
|
}
|
||||||
|
|
||||||
PropertySheet::PropertySheet(const PropertySheet &other)
|
PropertySheet::PropertySheet(const PropertySheet &other)
|
||||||
: owner(other.owner)
|
: dirty(other.dirty)
|
||||||
, dirty(other.dirty)
|
|
||||||
, mergedCells(other.mergedCells)
|
, mergedCells(other.mergedCells)
|
||||||
|
, owner(other.owner)
|
||||||
, propertyNameToCellMap(other.propertyNameToCellMap)
|
, propertyNameToCellMap(other.propertyNameToCellMap)
|
||||||
, documentObjectToCellMap(other.documentObjectToCellMap)
|
, documentObjectToCellMap(other.documentObjectToCellMap)
|
||||||
, signalCounter(0)
|
, signalCounter(0)
|
||||||
|
@ -857,7 +857,6 @@ bool PropertySheet::isHidden(CellAddress address) const
|
||||||
void PropertySheet::addDependencies(CellAddress key)
|
void PropertySheet::addDependencies(CellAddress key)
|
||||||
{
|
{
|
||||||
Cell * cell = getValue(key);
|
Cell * cell = getValue(key);
|
||||||
bool hasUnresolvedDeps = false;
|
|
||||||
|
|
||||||
if (!cell)
|
if (!cell)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -622,6 +622,7 @@ void Sheet::updateProperty(CellAddress key)
|
||||||
clear(key);
|
clear(key);
|
||||||
|
|
||||||
cellUpdated(key);
|
cellUpdated(key);
|
||||||
|
(void)prop;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -37,8 +37,8 @@ using namespace App;
|
||||||
|
|
||||||
SheetObserver::SheetObserver(App::Document * document, PropertySheet *_sheet)
|
SheetObserver::SheetObserver(App::Document * document, PropertySheet *_sheet)
|
||||||
: DocumentObserver(document)
|
: DocumentObserver(document)
|
||||||
, sheet(_sheet)
|
|
||||||
, refCount(1)
|
, refCount(1)
|
||||||
|
, sheet(_sheet)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,6 @@ int Spreadsheet::decodeColumn(const std::string &colstr)
|
||||||
|
|
||||||
Spreadsheet::CellAddress Spreadsheet::stringToAddress(const char * strAddress)
|
Spreadsheet::CellAddress Spreadsheet::stringToAddress(const char * strAddress)
|
||||||
{
|
{
|
||||||
int i = 0;
|
|
||||||
static const boost::regex e("\\${0,1}([A-Za-z]+)\\${0,1}([0-9]+)");
|
static const boost::regex e("\\${0,1}([A-Za-z]+)\\${0,1}([0-9]+)");
|
||||||
boost::cmatch cm;
|
boost::cmatch cm;
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ static std::string getUnitString(const Base::Unit & unit)
|
||||||
std::string unitStr;
|
std::string unitStr;
|
||||||
|
|
||||||
if (numerator.size() > 0) {
|
if (numerator.size() > 0) {
|
||||||
for (int i = 0; i < numerator.size(); ++i) {
|
for (std::size_t i = 0; i < numerator.size(); ++i) {
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
unitStr += "*";
|
unitStr += "*";
|
||||||
unitStr += numerator[i];
|
unitStr += numerator[i];
|
||||||
|
@ -120,7 +120,7 @@ static std::string getUnitString(const Base::Unit & unit)
|
||||||
|
|
||||||
if (denominator.size() > 1)
|
if (denominator.size() > 1)
|
||||||
unitStr += "(";
|
unitStr += "(";
|
||||||
for (int i = 0; i < denominator.size(); ++i) {
|
for (std::size_t i = 0; i < denominator.size(); ++i) {
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
unitStr += "*";
|
unitStr += "*";
|
||||||
unitStr += denominator[i];
|
unitStr += denominator[i];
|
||||||
|
|
|
@ -153,7 +153,6 @@ void SheetTableView::removeRows()
|
||||||
|
|
||||||
QModelIndexList rows = selectionModel()->selectedRows();
|
QModelIndexList rows = selectionModel()->selectedRows();
|
||||||
std::vector<int> sortedRows;
|
std::vector<int> sortedRows;
|
||||||
int extra = 0;
|
|
||||||
|
|
||||||
/* Make sure rows are sorted in descending order */
|
/* Make sure rows are sorted in descending order */
|
||||||
for (QModelIndexList::const_iterator it = rows.begin(); it != rows.end(); ++it)
|
for (QModelIndexList::const_iterator it = rows.begin(); it != rows.end(); ++it)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user