Skip to content

Commit

Permalink
Remove noexcept clauses for object returning functions
Browse files Browse the repository at this point in the history
  • Loading branch information
shBLOCK committed Apr 3, 2024
1 parent 406d630 commit 67dafed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions codegen/templates/common_binary_and_inplace_op.pyx
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
#<TEMPLATE_BEGIN>
#<OVERLOAD>
cdef _VecClassName_ ___OpName___(self, _VecClassName_ other) noexcept:
cdef _VecClassName_ ___OpName___(self, _VecClassName_ other):
cdef _VecClassName_ vec = _VecClassName_.__new__(_VecClassName_)
#<GEN>: gen_for_each_dim("vec.{dim} = self.{dim} _Op_ other.{dim}", _Dims_)
return vec

#<OVERLOAD>
cdef _VecClassName_ ___OpName___(self, _vTypeC_ other) noexcept:
cdef _VecClassName_ ___OpName___(self, _vTypeC_ other):
cdef _VecClassName_ vec = _VecClassName_.__new__(_VecClassName_)
#<GEN>: gen_for_each_dim("vec.{dim} = self.{dim} _Op_ other", _Dims_)
return vec

#<OVERLOAD_DISPATCHER>:___OpName___

#<OVERLOAD>
cdef _VecClassName_ __i_OpName___(self, _VecClassName_ other) noexcept:
cdef _VecClassName_ __i_OpName___(self, _VecClassName_ other):
#<GEN>: gen_for_each_dim("self.{dim} _Op_= other.{dim}", _Dims_)
return self

#<OVERLOAD>
cdef _VecClassName_ __i_OpName___(self, _vTypeC_ other) noexcept:
cdef _VecClassName_ __i_OpName___(self, _vTypeC_ other):
#<GEN>: gen_for_each_dim("self.{dim} _Op_= other", _Dims_)
return self

Expand Down
6 changes: 3 additions & 3 deletions codegen/templates/transform_2d.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ cdef class Transform2D:
t.ox, t.oy = origin.x, origin.y
return t

cdef inline Transform2D copy(self) noexcept:
cdef inline Transform2D copy(self):
cdef Transform2D t = Transform2D.__new__(Transform2D)
t.xx = self.xx
t.xy = self.xy
Expand Down Expand Up @@ -216,14 +216,14 @@ cdef class Transform2D:
return vec

#<OVERLOAD>
cdef Vec2 __call__(self, Vec2 other) noexcept:
cdef Vec2 __call__(self, Vec2 other):
cdef Vec2 vec = Vec2.__new__(Vec2)
vec.x = self.mulx(other.x, other.y)
vec.y = self.muly(other.x, other.y)
return vec

#<OVERLOAD>
cdef Transform2D __call__(self, Transform2D other) noexcept:
cdef Transform2D __call__(self, Transform2D other):
cdef Transform2D t = Transform2D.__new__(Transform2D)
t.xx = self.tdotx(other.xx, other.xy)
t.xy = self.tdoty(other.xx, other.xy)
Expand Down
6 changes: 3 additions & 3 deletions codegen/templates/transform_3d.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ cdef class Transform3D:

return t

cdef inline Transform3D copy(self) noexcept:
cdef inline Transform3D copy(self):
cdef Transform3D t = Transform3D.__new__(Transform3D)
t.xx = self.xx
t.xy = self.xy
Expand Down Expand Up @@ -324,15 +324,15 @@ cdef class Transform3D:
return vec

#<OVERLOAD>
cdef Vec3 __call__(self, Vec3 other) noexcept:
cdef Vec3 __call__(self, Vec3 other):
cdef Vec3 vec = Vec3.__new__(Vec3)
vec.x = self.mulx(other.x, other.y, other.z)
vec.y = self.muly(other.x, other.y, other.z)
vec.z = self.mulz(other.x, other.y, other.z)
return vec

#<OVERLOAD>
cdef Transform3D __call__(self, Transform3D other) noexcept:
cdef Transform3D __call__(self, Transform3D other):
cdef Transform3D t = Transform3D.__new__(Transform3D)
t.xx = self.tdotx(other.xx, other.xy, other.xz)
t.xy = self.tdoty(other.xx, other.xy, other.xz)
Expand Down

0 comments on commit 67dafed

Please sign in to comment.