[Tarantool-patches] [PATCH 1/2] alter: use good c++ style
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Sat Jul 11 22:53:26 MSK 2020
Thanks for the patch!
See 3 comments below.
On 08/07/2020 11:07, Aleksandr Lyapunov wrote:
> We should use noecept where it's appropriate.
1. noecept -> noexcept.
2. I am getting build errors:
/Users/gerold/Work/Repositories/tarantool/src/box/alter.cc:1635:16: error: function previously declared with an implicit exception specification redeclared with an explicit exception specification
[-Werror,-Wimplicit-exception-spec-mismatch]
TruncateIndex::~TruncateIndex() noexcept
^
/Users/gerold/Work/Repositories/tarantool/src/box/alter.cc:1597:2: note: previous declaration is here
~TruncateIndex() override;
^
/Users/gerold/Work/Repositories/tarantool/src/box/alter.cc:1722:23: error: function previously declared with an implicit exception specification redeclared with an explicit exception specification
[-Werror,-Wimplicit-exception-spec-mismatch]
RebuildCkConstraints::~RebuildCkConstraints() noexcept
^
/Users/gerold/Work/Repositories/tarantool/src/box/alter.cc:1682:2: note: previous declaration is here
~RebuildCkConstraints() override;
^
2 errors generated.
> diff --git a/src/box/alter.cc b/src/box/alter.cc
> index bb42548..1a7949e 100644
> --- a/src/box/alter.cc
> +++ b/src/box/alter.cc
> @@ -1652,14 +1649,14 @@ class UpdateSchemaVersion: public AlterSpaceOp
> public:
> UpdateSchemaVersion(struct alter_space * alter)
> :AlterSpaceOp(alter) {}
> - virtual void alter(struct alter_space *alter);
> + void alter(struct alter_space *alter) noexcept override;
> };
>
> void
> -UpdateSchemaVersion::alter(struct alter_space *alter)
> +UpdateSchemaVersion::alter(struct alter_space *alter) noexcept
> {
> - (void)alter;
> - ++schema_version;
> + (void) alter;
> + ++schema_version;
3. This change seems not to be related.
More information about the Tarantool-patches
mailing list