[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 98a3720 2/6: Explicitly qualify std::size_t
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 98a3720 2/6: Explicitly qualify std::size_t |
Date: |
Tue, 16 Feb 2021 20:11:38 -0500 (EST) |
branch: master
commit 98a3720daf8758b11cc14433e2ba88df80fc7475
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Explicitly qualify std::size_t
And include the header it requires.
---
census_view.cpp | 19 ++++++++++---------
unwind.cpp | 9 +++++----
2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/census_view.cpp b/census_view.cpp
index 93179fa..9ee061d 100644
--- a/census_view.cpp
+++ b/census_view.cpp
@@ -67,6 +67,7 @@
#include <algorithm>
#include <cctype> // isupper()
+#include <cstddef> // size_t
#include <fstream>
#include <istream> // ws
#include <iterator> // insert_iterator
@@ -646,10 +647,10 @@ class CensusViewGridTable
wxString GetTypeName(int row, int col) override;
// Override only used rows/cols handling functions.
- bool AppendRows(size_t numRows) override;
- bool DeleteRows(size_t pos, size_t numRows) override;
- bool AppendCols(size_t numCols) override;
- bool DeleteCols(size_t pos, size_t numCols) override;
+ bool AppendRows(std::size_t numRows) override;
+ bool DeleteRows(std::size_t pos, std::size_t numRows) override;
+ bool AppendCols(std::size_t numCols) override;
+ bool DeleteCols(std::size_t pos, std::size_t numCols) override;
wxString GetColLabelValue(int col) override;
@@ -773,7 +774,7 @@ bool CensusViewGridTable::CanMeasureColUsingSameAttr(int)
const
return true;
}
-bool CensusViewGridTable::AppendRows(size_t numRows)
+bool CensusViewGridTable::AppendRows(std::size_t numRows)
{
auto grid = GetView();
LMI_ASSERT(grid != nullptr);
@@ -788,7 +789,7 @@ bool CensusViewGridTable::AppendRows(size_t numRows)
return true;
}
-bool CensusViewGridTable::DeleteRows(size_t pos, size_t num_rows)
+bool CensusViewGridTable::DeleteRows(std::size_t pos, std::size_t num_rows)
{
auto grid = GetView();
LMI_ASSERT(grid != nullptr);
@@ -823,7 +824,7 @@ bool CensusViewGridTable::DeleteRows(size_t pos, size_t
num_rows)
return true;
}
-bool CensusViewGridTable::AppendCols(size_t numCols)
+bool CensusViewGridTable::AppendCols(std::size_t numCols)
{
auto grid = GetView();
LMI_ASSERT(grid != nullptr);
@@ -838,7 +839,7 @@ bool CensusViewGridTable::AppendCols(size_t numCols)
return true;
}
-bool CensusViewGridTable::DeleteCols(size_t pos, size_t num_cols)
+bool CensusViewGridTable::DeleteCols(std::size_t pos, std::size_t num_cols)
{
auto grid = GetView();
LMI_ASSERT(grid != nullptr);
@@ -932,7 +933,7 @@ std::string const& col_name(wxGridTableBase const& table,
int col)
{
return dynamic_cast<CensusViewGridTable const&>(table).col_name(col);
}
-}
+} // Unnamed namespace.
// class CensusView
diff --git a/unwind.cpp b/unwind.cpp
index 6ae91ec..e9c9500 100644
--- a/unwind.cpp
+++ b/unwind.cpp
@@ -27,6 +27,7 @@
#define UNW_LOCAL_ONLY
+#include <cstddef> // size_t
#include <cstdio> // fprintf()
#include <cstdlib> // free()
#include <cxxabi.h>
@@ -64,10 +65,10 @@ cxa_rethrow_t original_cxa_rethrow = (cxa_rethrow_t)
dlsym(RTLD_NEXT, "__cxa_ret
// ABI:
extern "C" char* __cxa_demangle
- (char const* mangled_name // mangled name, NUL-terminated
- ,char * output_buffer // just use 0
- ,size_t * length // just use 0
- ,int * status // zero --> success
+ (char const * mangled_name // mangled name, NUL-terminated
+ ,char * output_buffer // just use 0
+ ,std::size_t* length // just use 0
+ ,int * status // zero --> success
);
/// Print type of exception, and what() if it's a std::exception.
- [lmi-commits] [lmi] master updated (c90e25a -> 24c32d6), Greg Chicares, 2021/02/16
- [lmi-commits] [lmi] master 4c499e2 1/6: Correct a typo in a comment, Greg Chicares, 2021/02/16
- [lmi-commits] [lmi] master 98a3720 2/6: Explicitly qualify std::size_t,
Greg Chicares <=
- [lmi-commits] [lmi] master 24c32d6 6/6: Simplify by using PETE, Greg Chicares, 2021/02/16
- [lmi-commits] [lmi] master caf25c0 4/6: Fix defect committed 20210214T1925Z: implausible dummy values, Greg Chicares, 2021/02/16
- [lmi-commits] [lmi] master f8e65ae 5/6: Simplify by using PETE, Greg Chicares, 2021/02/16
- [lmi-commits] [lmi] master f01c071 3/6: Expunge untrue comments, Greg Chicares, 2021/02/16