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:
Milan Zamazal
2025-02-26 02:27:18 +02:00
committed by Laurent Pinchart
parent 4849a84a9b
commit 33ce463a46
6 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -350,7 +350,7 @@ void Object::connect(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)
iter = signals_.erase(iter);
else
+1 -1
View File
@@ -49,7 +49,7 @@ void SignalBase::disconnect(std::function<bool(SlotList::iterator &)> match)
{
MutexLocker locker(signalsLock);
for (auto iter = slots_.begin(); iter != slots_.end(); ) {
for (auto iter = slots_.begin(); iter != slots_.end();) {
if (match(iter)) {
Object *object = (*iter)->object();
if (object)
+1 -1
View File
@@ -657,7 +657,7 @@ void Thread::dispatchMessages(Message::Type type)
* the outer calls.
*/
if (!--data_->messages_.recursion_) {
for (auto iter = messages.begin(); iter != messages.end(); ) {
for (auto iter = messages.begin(); iter != messages.end();) {
if (!*iter)
iter = messages.erase(iter);
else
+1 -1
View File
@@ -75,7 +75,7 @@ void ProcessManager::sighandler()
return;
}
for (auto it = processes_.begin(); it != processes_.end(); ) {
for (auto it = processes_.begin(); it != processes_.end();) {
Process *process = *it;
int wstatus;