summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/src/align_struct_initializers.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-12-01 12:38:43 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-12-01 12:38:43 +0900
commitb67b7f2b784c7105e88a5e639d9d84736ae2cbc1 (patch)
tree0fd16d439c681c07d57d7f0d544c7582e04c3a31 /debian/uncrustify-trinity/uncrustify-trinity-0.78.1/src/align_struct_initializers.cpp
parentc0a6f1b84c84749908961579b84513fd9f9d9eac (diff)
downloadextra-dependencies-b67b7f2b784c7105e88a5e639d9d84736ae2cbc1.tar.gz
extra-dependencies-b67b7f2b784c7105e88a5e639d9d84736ae2cbc1.zip
uncrustify-trinity: updated based on upstream version 0.78.1
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.1/src/align_struct_initializers.cpp')
-rw-r--r--debian/uncrustify-trinity/uncrustify-trinity-0.78.1/src/align_struct_initializers.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/src/align_struct_initializers.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/src/align_struct_initializers.cpp
new file mode 100644
index 00000000..ca032bc3
--- /dev/null
+++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/src/align_struct_initializers.cpp
@@ -0,0 +1,34 @@
+/**
+ * @file align_struct_initializers.cpp
+ *
+ * @author Guy Maurel
+ * split from align.cpp
+ * @author Ben Gardner
+ * @license GPL v2+
+ */
+
+#include "align_struct_initializers.h"
+
+#include "align_init_brace.h"
+#include "chunk.h"
+
+
+void align_struct_initializers()
+{
+ LOG_FUNC_ENTRY();
+ Chunk *pc = Chunk::GetHead();
+
+ while (pc->IsNotNullChunk())
+ {
+ Chunk *prev = pc->GetPrevNcNnl();
+
+ if ( prev->Is(CT_ASSIGN)
+ && ( pc->Is(CT_BRACE_OPEN)
+ || ( language_is_set(LANG_D)
+ && pc->Is(CT_SQUARE_OPEN))))
+ {
+ align_init_brace(pc);
+ }
+ pc = pc->GetNextType(CT_BRACE_OPEN);
+ }
+} // align_struct_initializers