[Tarantool-patches] [PATCH 1/2] alter: use good c++ style

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Tue Jul 14 01:17:42 MSK 2020


> : @@ -1475,7 +1471,7 @@ CreateIndex::prepare(struct alter_space *alter)
> :  }
> : 
> :  void
> : -CreateIndex::commit(struct alter_space *alter, int64_t signature)
> : +CreateIndex::commit(struct alter_space *alter, int64_t signature)
> : noexcept
> :  {
> :  	(void) alter;
> 
> The same comment is applicable here - we could simply omit argument name

Argument name omission reduces code readability. We have already had
that discussion in Lua because of luacheck requiring to drop some
arguments. But it does not make the code better really.

> : -    ++schema_version;
> : +	(void) alter;
> : +	++schema_version;
> 
> But here we could ask _very important question_ (:)) do we use spaces
> or tabs (like in C) for indenting C++ sources? Looks like Tabs are not yet
> used in this file, thus no need to enforce the different style.

Alter.cc uses tabs only. Except this place probably.


More information about the Tarantool-patches mailing list