Commit 131fc83d authored by Huff, Israel's avatar Huff, Israel
Browse files

Fortify changes

parent 285d83ad
Pipeline #67105 failed with stages
in 20 minutes and 48 seconds
......@@ -21,18 +21,20 @@ class RADIX_PUBLIC TableView::PImpl
TableView::PImpl::PImpl()
{
allow_paste = false;
copy_vert_header = false;
allow_paste = false;
copy_vert_header = false;
copy_horiz_header = false;
separator = '\t';
separator = '\t';
}
TableView::TableView(QWidget *parent)
: QTableView(parent)
, p(new PImpl(), [](PImpl *impl) { delete impl; })
, p(new PImpl(), deleter)
{
}
void TableView::deleter(PImpl *impl) { delete impl; }
char TableView::separator() const { return p->separator; }
void TableView::setSeparator(char value) { p->separator = value; }
......@@ -98,11 +100,11 @@ void TableView::copy()
}
if (p->copy_horiz_header)
{
for (int i = 0; i < cols.size(); i++)
{
if (i > 0) data.append(p->separator);
data.append(chmodel->headerData(cols[i], Qt::Horizontal).toString());
}
for (int i = 0; i < cols.size(); i++)
{
if (i > 0) data.append(p->separator);
data.append(chmodel->headerData(cols[i], Qt::Horizontal).toString());
}
}
data.append('\n');
}
......
......@@ -21,9 +21,10 @@ class RADIX_PUBLIC TableView : public QTableView
class PImpl;
std::unique_ptr<PImpl, void (*)(PImpl *)> p;
static void deleter(PImpl *impl);
public:
TableView(QWidget *parent = 0);
TableView(QWidget *parent = nullptr);
char separator() const;
void setSeparator(char value);
......
......@@ -832,6 +832,7 @@ bool vtkPlotPointsErrorBars::UpdateTableCache(vtkTable *table)
}
vtkDataArray *x = array[0];
vtkDataArray *y = array[1];
if (x == nullptr || y == nullptr) return false;
// Now copy the components into their new columns
if (this->UseIndexForXSeries)
......@@ -868,7 +869,7 @@ bool vtkPlotPointsErrorBars::UpdateTableCache(vtkTable *table)
if (xErr)
{
switch (xErr->GetDataType())
{
{
vtkTemplateMacro(CopyToXErrors(
this->XErrors, static_cast<VTK_TT *>(xErr->GetVoidPointer(0)),
int(xErr->GetNumberOfTuples()), this->ShiftScale));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment