Skip to content

Commit 60de51c

Browse files
committed
odb: clang-format
Signed-off-by: Eren Dogan <erdogan@ucsc.edu>
1 parent 70bc87b commit 60de51c

2 files changed

Lines changed: 24 additions & 25 deletions

File tree

src/odb/src/db/dbJournal.cpp

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ void dbJournal::redo()
251251
_log.pop(end_action);
252252
_log.pop(action_idx);
253253
if (end_action != END_ACTION || action_idx != s) {
254-
_logger->critical(utl::ODB, 419, "In redo, didn't see the expected END_ACTION.");
254+
_logger->critical(
255+
utl::ODB, 419, "In redo, didn't see the expected END_ACTION.");
255256
}
256257
}
257258
}
@@ -1704,12 +1705,8 @@ void dbJournal::undo()
17041705
_log.moveBackOneInt();
17051706

17061707
for (;;) {
1707-
debugPrint(_logger,
1708-
utl::ODB,
1709-
"DB_ECO",
1710-
4,
1711-
"UNDO ECO: Log index {}",
1712-
_log.idx());
1708+
debugPrint(
1709+
_logger, utl::ODB, "DB_ECO", 4, "UNDO ECO: Log index {}", _log.idx());
17131710
uint action_idx;
17141711
_log.pop(action_idx);
17151712
debugPrint(_logger,
@@ -1721,7 +1718,6 @@ void dbJournal::undo()
17211718
_log.set(action_idx);
17221719
_log.pop(_cur_action);
17231720

1724-
17251721
switch (_cur_action) {
17261722
case CREATE_OBJECT:
17271723
undo_createObject();
@@ -1758,11 +1754,7 @@ void dbJournal::undo()
17581754
_log.set(action_idx);
17591755
_log.moveBackOneInt();
17601756
}
1761-
debugPrint(_logger,
1762-
utl::ODB,
1763-
"DB_ECO",
1764-
4,
1765-
"UNDO ECO: Finished undo >>>");
1757+
debugPrint(_logger, utl::ODB, "DB_ECO", 4, "UNDO ECO: Finished undo >>>");
17661758
}
17671759

17681760
void dbJournal::undo_createObject()
@@ -2405,7 +2397,8 @@ void dbJournal::undo_swapObject()
24052397
utl::ODB,
24062398
"DB_ECO",
24072399
3,
2408-
"UNDO ECO: swap dbName (dbNet) between {} at id {} and {} at id {}",
2400+
"UNDO ECO: swap dbName (dbNet) between {} at id {} and {} "
2401+
"at id {}",
24092402
source_net->getName(),
24102403
source_net_id,
24112404
dest_net->getName(),
@@ -2415,11 +2408,12 @@ void dbJournal::undo_swapObject()
24152408
break;
24162409
}
24172410
default: {
2418-
_logger->critical(utl::ODB,
2419-
467,
2420-
"No undo_swapObject support for type {} and subtype {}",
2421-
dbObject::getTypeName(obj_type),
2422-
dbObject::getTypeName(sub_obj_type));
2411+
_logger->critical(
2412+
utl::ODB,
2413+
467,
2414+
"No undo_swapObject support for type {} and subtype {}",
2415+
dbObject::getTypeName(obj_type),
2416+
dbObject::getTypeName(sub_obj_type));
24232417
}
24242418
}
24252419
break;
@@ -2581,8 +2575,10 @@ void dbJournal::undo_updateModNetField()
25812575
}
25822576

25832577
default:
2584-
_logger->critical(
2585-
utl::ODB, 424, "No undo_updateModNetField support for field {}", field);
2578+
_logger->critical(utl::ODB,
2579+
424,
2580+
"No undo_updateModNetField support for field {}",
2581+
field);
25862582
break;
25872583
}
25882584
}

src/odb/src/db/dbJournalLog.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// SPDX-License-Identifier: BSD-3-Clause
22
// Copyright (c) 2019-2025, The OpenROAD Authors
33

4-
#include "dbJournal.h"
54
#include "dbJournalLog.h"
65

76
#include <cstring>
87
#include <string>
98

109
#include "dbCommon.h"
10+
#include "dbJournal.h"
1111
#include "utl/Logger.h"
1212

1313
namespace odb {
@@ -268,7 +268,8 @@ void dbJournalLog::append(dbJournalLog& other)
268268
uint supposed_idx = action_indices.back();
269269
action_indices.pop_back();
270270
if (current_idx != supposed_idx) {
271-
logger_->critical(utl::ODB, 438, "In append, didn't match the expected action index.");
271+
logger_->critical(
272+
utl::ODB, 438, "In append, didn't match the expected action index.");
272273
}
273274
uint next_idx = other.size();
274275
if (action_indices.size() > 0) {
@@ -285,8 +286,10 @@ void dbJournalLog::append(dbJournalLog& other)
285286
unsigned int action_idx;
286287
other.pop(end_action);
287288
other.pop(action_idx);
288-
if (end_action != dbJournal::Action::END_ACTION || action_idx != current_idx) {
289-
logger_->critical(utl::ODB, 459, "In append, didn't see an expected END_ACTION.");
289+
if (end_action != dbJournal::Action::END_ACTION
290+
|| action_idx != current_idx) {
291+
logger_->critical(
292+
utl::ODB, 459, "In append, didn't see an expected END_ACTION.");
290293
}
291294
push(end_action);
292295
push(current_idx + shift_idx);

0 commit comments

Comments
 (0)