Sybren A. Stüvel
7f2d356a67
Cleanup: Clang-Tidy, modernize-use-using
...
Replace `typedef` with `using` in C++ code.
In the case of `typedef struct SomeName { ... } SomeName;` I removed the
`typedef` altogether, as this is unnecessary in C++. Such cases have been
rewritten to `struct SomeName { ... };`
No functional changes.
2020-12-04 12:46:43 +01:00
Sybren A. Stüvel
168909d974
Cleanup: Clang-Tidy, modernize-use-override
...
No functional changes.
2020-12-04 12:02:52 +01:00
Sybren A. Stüvel
958df2ed1b
Cleanup: Clang-Tidy, modernize-deprecated-headers
...
No functional changes.
2020-12-04 11:28:09 +01:00
Campbell Barton
8c846cccd6
Cleanup: clang-format
2020-11-09 15:47:08 +11:00
Ankit Meel
9cd9ea591f
Cleanup: NULL to nullptr.
2020-11-07 21:52:53 +05:30
Ankit Meel
4525049aa0
Cleanup: Clang-tidy, modernize-concat-nested-namespaces
2020-11-07 18:48:13 +05:30
Sybren A. Stüvel
16732def37
Cleanup: Clang-Tidy modernize-use-nullptr
...
Replace `NULL` with `nullptr` in C++ code.
No functional changes.
2020-11-06 18:08:25 +01:00
Sergey Sharybin
3cb4c51308
Cleanup: Clang-Tidy, modernize-make-unique
2020-11-06 16:47:16 +01:00
Sergey Sharybin
8d5073345d
Cleanup: Clang-Tidy, modernize-use-emplace
2020-11-06 14:06:52 +01:00
Sergey Sharybin
190170d4cc
Cleanup: Clang-Tidy, readability-redundant-member-init
2020-11-06 11:54:53 +01:00
Campbell Barton
aa3a4973a3
Cleanup: use ELEM macro
2020-11-06 12:32:54 +11:00
Campbell Barton
23f1dea440
Cleanup: spelling
2020-09-09 13:30:05 +10:00
Sebastian Parborg
2115232a16
Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fix
...
No functional changes
2020-09-04 21:04:16 +02:00
Sybren A. Stüvel
8057ab10db
Cleanup: Clang-Tidy readability-const-return-type fixes
...
No functional changes.
2020-09-04 12:04:47 +02:00
Campbell Barton
171e77c3c2
Cleanup: use array syntax for sizeof with fixed values
...
Also order sizeof(..) first to promote other values to size_t.
2020-08-08 13:38:00 +10:00
Campbell Barton
586a308467
Cleanup: remove redundant return parenthesis
2020-08-08 13:37:55 +10:00
Jacques Lucke
e3f369e13f
Cleanup: fix some clang tidy warnings
2020-08-07 19:19:38 +02:00
Sybren A. Stüvel
326e137a8c
Cleanup: Freestyle, Clang-Tidy else-after-return fixes
...
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/freestyle` module.
No functional changes.
2020-08-07 13:38:06 +02:00
Jacques Lucke
91694b9b58
Code Style: use "#pragma once" in source directory
...
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.
This patch has been generated by P1561 followed by `make format`.
Differential Revision: https://developer.blender.org/D8466
2020-08-07 09:50:34 +02:00
Jacques Lucke
725973485a
Clang Tidy: enable readability-non-const-parameter warning
...
Clang Tidy reported a couple of false positives. I disabled
those `NOLINTNEXTLINE`.
Differential Revision: https://developer.blender.org/D8199
2020-07-13 11:27:09 +02:00
Jacques Lucke
4a5389816b
Clang-Tidy: enable readability-named-parameter
2020-07-03 17:07:13 +02:00
Sergey Sharybin
f891d4e2ad
Clang-Tidy: Fix readability-delete-null-pointer warnings
...
Also enable it in the configuration.
2020-07-03 16:32:51 +02:00
Jacques Lucke
2633683b52
Clang-tidy: enable readability-container-size-empty warning
...
Reviewers: sergey
Differential Revision: https://developer.blender.org/D8197
2020-07-03 14:59:27 +02:00
Campbell Barton
fd5c185beb
Cleanup: spelling
2020-06-25 23:14:36 +10:00
Sergey Sharybin
3f5b295084
Freestyle: Fix compilation error with C++17
...
AutoPtr class became a sub-class of unique_ptr with some special magic
to mimic behavior of auto_ptr for copy constructor.
The code was already there, but for some reason visual studio did not
set __cplusplus correctly for some reason.
The other change is remove of binary function usage, which is not
needed in the Freestyle code.
2020-06-19 12:02:21 +02:00
Campbell Barton
9e96c6d054
Cleanup: spelling
2020-06-05 14:34:00 +10:00
Jacques Lucke
6f985574b7
Cleanup: take includes out of 'extern "C"' blocks
...
Surrounding includes with an 'extern "C"' block is not necessary anymore.
Also that made it harder to add any C++ code to some headers, or include headers
that have "optional" C++ code like `MEM_guardedalloc.h`.
I tested compilation on linux and windows (and got help from @LazyDodo).
If this still breaks compilation due to some linker error, the header containing
the symbol in question is probably missing an 'extern "C"' block.
Differential Revision: https://developer.blender.org/D7653
2020-05-08 18:22:41 +02:00
Brecht Van Lommel
f4ee9643ad
Fix Linux/GCC build error after recent changes
2020-04-21 14:28:26 +02:00
Brecht Van Lommel
5fed9ac9b5
Fix clang-format differences between version 6 and 9
...
Version 6 does not appear to respect clang-format off for header sorting.
2020-04-21 13:16:59 +02:00
Campbell Barton
ed4c47632f
Cleanup: spelling
2020-03-19 12:09:07 +11:00
Dalai Felinto
85424397b1
Cleanup: tweak Freestyle #includes in preparation for clang-format sorting
2020-03-06 17:26:32 +01:00
Campbell Barton
3e6e9ce01b
Cleanup: extra semicolons, comma use, undeclared vars
2020-02-11 12:04:50 +11:00
Campbell Barton
dc2cd2d0dc
Cleanup: clang-format, spelling
2019-10-10 10:29:50 +11:00
Campbell Barton
760dbd1cbf
Cleanup: misc spelling fixes
...
T68035 by @luzpaz
2019-08-01 14:02:41 +10:00
Brecht Van Lommel
604fdb6e85
Spelling fixes in comments and descriptions, patch by luzpaz
...
Differential Revision: https://developer.blender.org/D3744
2019-07-31 14:27:35 +02:00
Campbell Barton
e85635b882
Cleanup: comment spelling
2019-06-17 08:05:58 +10:00
Campbell Barton
aba4e6810f
Cleanup: style, use braces in source/ (include disabled blocks)
2019-05-31 23:22:52 +10:00
Campbell Barton
d8dbd49a2f
Cleanup: style, use braces in source/
...
Automated using clang-tidy.
2019-05-31 22:55:15 +10:00
Campbell Barton
5b14b56542
Cleanup: typos in comments
2019-05-02 18:25:36 +10:00
Campbell Barton
1cb091ae7a
Cleanup: correct arg wrapping from recent cleanup
2019-05-01 20:32:38 +10:00
Campbell Barton
1e8697cd80
Cleanup: comments (long lines) in freestyle
2019-05-01 07:58:27 +10:00
Campbell Barton
41d4a19865
ClangFormat: format '#if 0' code in source/
2019-04-17 08:24:14 +02:00
Campbell Barton
e12c08e8d1
ClangFormat: apply to source, most of intern
...
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
Campbell Barton
dbc058301b
Cleanup: trailing commas
2019-04-16 16:40:47 +02:00
Campbell Barton
de13d0a80c
doxygen: add newline after \file
...
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
Campbell Barton
eef4077f18
Cleanup: remove redundant doxygen \file argument
...
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
Pablo Vazquez
3be845ce20
Cleanup: Typos in comments (to to)
2019-02-04 01:23:48 +01:00
Campbell Barton
744f633986
Cleanup: trailing commas
...
Needed for clan-format not to wrap onto one line.
2019-02-03 14:59:11 +11:00
Campbell Barton
4ef09cf937
Cleanup: remove author/date info from doxy headers
2019-02-02 11:58:24 +11:00
Campbell Barton
65ec7ec524
Cleanup: remove redundant, invalid info from headers
...
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00