Skip to content

Commit b1e4e0f

Browse files
add noexcept to get rid of warnings
1 parent c192697 commit b1e4e0f

File tree

13 files changed

+18
-18
lines changed

13 files changed

+18
-18
lines changed

libs/EXTERNAL/libezgl/include/ezgl/point.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class point2d {
3636
/**
3737
* Create a point at the given x and y position.
3838
*/
39-
point2d(double x_coord, double y_coord) : x(x_coord), y(y_coord)
39+
point2d(double x_coord, double y_coord) noexcept : x(x_coord), y(y_coord)
4040
{
4141
}
4242

libs/EXTERNAL/libezgl/include/ezgl/rectangle.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class rectangle {
3333
/**
3434
* Default constructor: Create a zero-sized rectangle at {0,0}.
3535
*/
36-
rectangle() : m_first({0, 0}), m_second({0, 0})
36+
rectangle() noexcept : m_first({0, 0}), m_second({0, 0})
3737
{
3838
}
3939

libs/EXTERNAL/libtatum/libtatum/tatum/util/tatum_strong_id.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ template<typename tag, typename T, T sentinel>
161161
bool operator!=(const StrongId<tag,T,sentinel>& lhs, const StrongId<tag,T,sentinel>& rhs);
162162

163163
template<typename tag, typename T, T sentinel>
164-
bool operator<(const StrongId<tag,T,sentinel>& lhs, const StrongId<tag,T,sentinel>& rhs);
164+
bool operator<(const StrongId<tag,T,sentinel>& lhs, const StrongId<tag,T,sentinel>& rhs) noexcept;
165165

166166

167167
//Class template definition with default template parameters
@@ -215,7 +215,7 @@ bool operator!=(const StrongId<tag,T,sentinel>& lhs, const StrongId<tag,T,sentin
215215

216216
//Needed for std::map-like containers
217217
template<typename tag, typename T, T sentinel>
218-
bool operator<(const StrongId<tag,T,sentinel>& lhs, const StrongId<tag,T,sentinel>& rhs) {
218+
bool operator<(const StrongId<tag,T,sentinel>& lhs, const StrongId<tag,T,sentinel>& rhs) noexcept {
219219
return lhs.id_ < rhs.id_;
220220
}
221221

libs/libarchfpga/src/cad_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ struct t_pack_patterns {
104104
std::vector<std::vector<t_pb_graph_pin*>> chain_root_pins;
105105

106106
// default constructor initializing to an invalid pack pattern
107-
t_pack_patterns() {
107+
t_pack_patterns() noexcept {
108108
name = nullptr;
109109
index = -1;
110110
root_block = nullptr;

libs/librrgraph/src/base/rr_graph_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct t_pin_chain_node {
2121
int nxt_node_idx = OPEN;
2222

2323
t_pin_chain_node() = default;
24-
t_pin_chain_node(int pin_num, int nxt_idx)
24+
t_pin_chain_node(int pin_num, int nxt_idx) noexcept
2525
: pin_physical_num(pin_num)
2626
, nxt_node_idx(nxt_idx) {}
2727
};

libs/libvtrutil/src/vtr_flat_map.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class flat_map2;
2121
* @brief A function to create a flat map
2222
*
2323
* Helper function to create a flat map from a vector of pairs
24-
* without haveing to explicity specify the key and value types
24+
* without having to explicitly specify the key and value types
2525
*/
2626
template<class K, class V>
2727
flat_map<K, V> make_flat_map(std::vector<std::pair<K, V>>&& vec) {
@@ -435,7 +435,7 @@ template<class K, class T, class Compare, class Storage>
435435
class flat_map2 : public flat_map<K, T, Compare, Storage> {
436436
public:
437437
///@brief Constructor
438-
flat_map2() {}
438+
flat_map2() noexcept {}
439439
explicit flat_map2(std::vector<typename flat_map2<K, T, Compare, Storage>::value_type>&& values)
440440
: flat_map<K, T, Compare>(std::move(values)) {}
441441

libs/libvtrutil/src/vtr_geometry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ template<class T>
119119
class Rect {
120120
public: //Constructors
121121
///@brief default constructor
122-
Rect();
122+
Rect() noexcept;
123123

124124
///@brief construct using 4 vertex
125125
Rect(T left_val, T bottom_val, T right_val, T top_val);

libs/libvtrutil/src/vtr_geometry.tpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Point<T>& Point<T>::operator-=(const Point<T>& rhs) {
8686
* Rect
8787
*/
8888
template<class T>
89-
Rect<T>::Rect()
89+
Rect<T>::Rect() noexcept
9090
: Rect<T>(Point<T>(0, 0), Point<T>(0, 0)) {
9191
//pass
9292
}

libs/libvtrutil/src/vtr_ndoffsetmatrix.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class NdOffsetMatrixProxy {
6363
* dim_stride: The stride of this dimension (i.e. how many element in memory between indicies of this dimension)
6464
* start: Pointer to the start of the sub-matrix this proxy represents
6565
*/
66-
NdOffsetMatrixProxy<T, N>(const DimRange* dim_ranges, size_t idim, size_t dim_stride, T* start)
66+
NdOffsetMatrixProxy(const DimRange* dim_ranges, size_t idim, size_t dim_stride, T* start)
6767
: dim_ranges_(dim_ranges)
6868
, idim_(idim)
6969
, dim_stride_(dim_stride)
@@ -116,7 +116,7 @@ class NdOffsetMatrixProxy<T, 1> {
116116
* - dim_stride: The stride of this dimension (i.e. how many element in memory between indicies of this dimension)
117117
* - start: Pointer to the start of the sub-matrix this proxy represents
118118
*/
119-
NdOffsetMatrixProxy<T, 1>(const DimRange* dim_ranges, size_t idim, size_t dim_stride, T* start)
119+
NdOffsetMatrixProxy(const DimRange* dim_ranges, size_t idim, size_t dim_stride, T* start)
120120
: dim_ranges_(dim_ranges)
121121
, idim_(idim)
122122
, dim_stride_(dim_stride)

libs/libvtrutil/src/vtr_strong_id.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,11 @@ class StrongId {
182182
static constexpr StrongId INVALID() noexcept { return StrongId(); }
183183

184184
///@brief Default to the sentinel value
185-
constexpr StrongId()
185+
constexpr StrongId() noexcept
186186
: id_(sentinel) {}
187187

188188
///@brief Only allow explicit constructions from a raw Id (no automatic conversions)
189-
explicit constexpr StrongId(T id)
189+
explicit constexpr StrongId(T id) noexcept
190190
: id_(id) {}
191191

192192
// Allow some explicit conversion to useful types:

vpr/src/base/setup_noc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
// a data structure to store the position information of a noc router in the FPGA device
4141
struct t_noc_router_tile_position {
42-
t_noc_router_tile_position(int x, int y, int layer_num, float centroid_x, float centroid_y)
42+
t_noc_router_tile_position(int x, int y, int layer_num, float centroid_x, float centroid_y) noexcept
4343
: grid_width_position(x)
4444
, grid_height_position(y)
4545
, layer_position(layer_num)

vpr/src/pack/pack_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ struct t_lb_type_rr_node {
6969
t_pb_graph_pin* pb_graph_pin; /* pb_graph_pin associated with this lb_rr_node if exists, NULL otherwise */
7070
float intrinsic_cost; /* cost of this node */
7171

72-
t_lb_type_rr_node() {
72+
t_lb_type_rr_node() noexcept {
7373
capacity = 0;
7474
num_modes = 0;
7575
num_fanout = nullptr;
@@ -130,7 +130,7 @@ struct t_intra_lb_net {
130130
std::vector<bool> fixed_terminals; /* Marks a terminal as having a fixed target (i.e. a pin not a sink) */
131131
t_lb_trace* rt_tree; /* Route tree head */
132132

133-
t_intra_lb_net() {
133+
t_intra_lb_net() noexcept {
134134
atom_net_id = AtomNetId::INVALID();
135135
rt_tree = nullptr;
136136
}

vpr/src/timing/PreClusterDelayCalculator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class PreClusterDelayCalculator : public tatum::DelayCalculator {
1919
PreClusterDelayCalculator(const AtomNetlist& netlist,
2020
const AtomLookup& netlist_lookup,
2121
float intercluster_net_delay,
22-
const Prepacker& prepacker)
22+
const Prepacker& prepacker) noexcept
2323
: netlist_(netlist)
2424
, netlist_lookup_(netlist_lookup)
2525
, inter_cluster_net_delay_(intercluster_net_delay)

0 commit comments

Comments
 (0)