libcamera: formatting: Avoid spaces in for loops without expression
The clang formatter removes spaces in places of empty expressions in for loops. For example, it changes for (init; condition; ) to for (init; condition;) libcamera currently uses both the styles and we should use only one of them for consistency. Since there is apparently no option to override the formatter behavior (see https://clang.llvm.org/docs/ClangFormatStyleOptions.html), let's remove the extra spaces to make the formatter happy. Signed-off-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
4849a84a9b
commit
33ce463a46
6 changed files with 6 additions and 6 deletions
|
@ -1040,7 +1040,7 @@ void OptionsParser::usageOptions(const std::list<Option> &options,
|
||||||
|
|
||||||
std::cerr << std::setw(indent) << argument;
|
std::cerr << std::setw(indent) << argument;
|
||||||
|
|
||||||
for (const char *help = option.help, *end = help; end; ) {
|
for (const char *help = option.help, *end = help; end;) {
|
||||||
end = strchr(help, '\n');
|
end = strchr(help, '\n');
|
||||||
if (end) {
|
if (end) {
|
||||||
std::cerr << std::string(help, end - help + 1);
|
std::cerr << std::string(help, end - help + 1);
|
||||||
|
|
|
@ -249,7 +249,7 @@ void FormatConverter::convertYUVPacked(const Image *srcImage, unsigned char *dst
|
||||||
dst_stride = width_ * 4;
|
dst_stride = width_ * 4;
|
||||||
|
|
||||||
for (src_y = 0, dst_y = 0; dst_y < height_; src_y++, dst_y++) {
|
for (src_y = 0, dst_y = 0; dst_y < height_; src_y++, dst_y++) {
|
||||||
for (src_x = 0, dst_x = 0; dst_x < width_; ) {
|
for (src_x = 0, dst_x = 0; dst_x < width_;) {
|
||||||
cb = src[src_y * src_stride + src_x * 4 + cb_pos_];
|
cb = src[src_y * src_stride + src_x * 4 + cb_pos_];
|
||||||
cr = src[src_y * src_stride + src_x * 4 + cr_pos];
|
cr = src[src_y * src_stride + src_x * 4 + cr_pos];
|
||||||
|
|
||||||
|
|
|
@ -350,7 +350,7 @@ void Object::connect(SignalBase *signal)
|
||||||
|
|
||||||
void Object::disconnect(SignalBase *signal)
|
void Object::disconnect(SignalBase *signal)
|
||||||
{
|
{
|
||||||
for (auto iter = signals_.begin(); iter != signals_.end(); ) {
|
for (auto iter = signals_.begin(); iter != signals_.end();) {
|
||||||
if (*iter == signal)
|
if (*iter == signal)
|
||||||
iter = signals_.erase(iter);
|
iter = signals_.erase(iter);
|
||||||
else
|
else
|
||||||
|
|
|
@ -49,7 +49,7 @@ void SignalBase::disconnect(std::function<bool(SlotList::iterator &)> match)
|
||||||
{
|
{
|
||||||
MutexLocker locker(signalsLock);
|
MutexLocker locker(signalsLock);
|
||||||
|
|
||||||
for (auto iter = slots_.begin(); iter != slots_.end(); ) {
|
for (auto iter = slots_.begin(); iter != slots_.end();) {
|
||||||
if (match(iter)) {
|
if (match(iter)) {
|
||||||
Object *object = (*iter)->object();
|
Object *object = (*iter)->object();
|
||||||
if (object)
|
if (object)
|
||||||
|
|
|
@ -657,7 +657,7 @@ void Thread::dispatchMessages(Message::Type type)
|
||||||
* the outer calls.
|
* the outer calls.
|
||||||
*/
|
*/
|
||||||
if (!--data_->messages_.recursion_) {
|
if (!--data_->messages_.recursion_) {
|
||||||
for (auto iter = messages.begin(); iter != messages.end(); ) {
|
for (auto iter = messages.begin(); iter != messages.end();) {
|
||||||
if (!*iter)
|
if (!*iter)
|
||||||
iter = messages.erase(iter);
|
iter = messages.erase(iter);
|
||||||
else
|
else
|
||||||
|
|
|
@ -75,7 +75,7 @@ void ProcessManager::sighandler()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto it = processes_.begin(); it != processes_.end(); ) {
|
for (auto it = processes_.begin(); it != processes_.end();) {
|
||||||
Process *process = *it;
|
Process *process = *it;
|
||||||
|
|
||||||
int wstatus;
|
int wstatus;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue