Skip to content

Commit

Permalink
clang-format and test cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
parejkoj committed Mar 19, 2024
1 parent aa8f2ea commit 5b03b33
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 30 deletions.
9 changes: 4 additions & 5 deletions include/lsst/afw/table/BaseTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ namespace detail {
* Table and Record classes.
*/
struct RecordData {
void * data;
void* data;
std::shared_ptr<BaseTable> table;
ndarray::Manager::Ptr manager;
};

} // namespace detail
} // namespace detail

/**
* Base class for all tables.
Expand Down Expand Up @@ -185,7 +185,6 @@ class BaseTable : public std::enable_shared_from_this<BaseTable> {
virtual ~BaseTable();

protected:

/**
* Helper function that must be used by all _makeRecord overrides to
* actually construct records.
Expand All @@ -202,8 +201,8 @@ class BaseTable : public std::enable_shared_from_this<BaseTable> {
*/
// n.b. this is implemented in BaseRecord.h, as it requires the BaseRecord
// definition, and must go in a header.
template <typename RecordT, typename ...Args>
std::shared_ptr<RecordT> constructRecord(Args && ...args);
template <typename RecordT, typename... Args>
std::shared_ptr<RecordT> constructRecord(Args&&... args);

virtual void handleAliasChange(std::string const& alias) {}

Expand Down
13 changes: 4 additions & 9 deletions src/table/BaseTable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,7 @@ std::shared_ptr<BaseTable> BaseTable::make(Schema const &schema) {
return std::shared_ptr<BaseTable>(new BaseTable(schema));
}

Schema BaseTable::makeMinimalSchema() {
return Schema();
}
Schema BaseTable::makeMinimalSchema() { return Schema(); }

std::shared_ptr<BaseRecord> BaseTable::copyRecord(BaseRecord const &input) {
std::shared_ptr<BaseRecord> output = makeRecord();
Expand All @@ -145,9 +143,7 @@ std::shared_ptr<BaseTable> BaseTable::_clone() const {
return std::shared_ptr<BaseTable>(new BaseTable(*this));
}

std::shared_ptr<BaseRecord> BaseTable::_makeRecord() {
return constructRecord<BaseRecord>();
}
std::shared_ptr<BaseRecord> BaseTable::_makeRecord() { return constructRecord<BaseRecord>(); }

BaseTable::BaseTable(Schema const &schema, std::shared_ptr<daf::base::PropertyList> metadata)
: _schema(schema), _metadata(metadata) {
Expand Down Expand Up @@ -190,9 +186,8 @@ struct RecordDestroyer {
detail::RecordData BaseTable::_makeNewRecordData() {
auto data = Block::get(_schema.getRecordSize(), _manager);
return detail::RecordData{
data,
shared_from_this(),
_manager // manager always points to the most recently-used block.
data, shared_from_this(),
_manager // manager always points to the most recently-used block.
};
}

Expand Down
8 changes: 0 additions & 8 deletions tests/test_simpleTable.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

"""
Tests for table.SimpleTable
Run with:
python test_simpleTable.py
or
pytest test_simpleTable.py
"""
import os.path
import unittest

Expand Down
8 changes: 0 additions & 8 deletions tests/test_sourceTable.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

"""
Tests for table.SourceTable
Run with:
python test_sourceTable.py
or
pytest test_sourceTable.py
"""
import os
import unittest
import tempfile
Expand Down

0 comments on commit 5b03b33

Please sign in to comment.