Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey@blender.org>2021-03-05 16:42:30 +0300
committerSergey Sharybin <sergey@blender.org>2021-03-05 17:05:08 +0300
commit0dd9a4a576452007da9d3f02a03499e50a8ddfae (patch)
tree3df82ff28a03613a60e5a44b97f40bfffbffaca6 /intern/libmv/libmv/base/vector_utils.h
parente0442a955badbbf7ee6f280bb988054175802bc1 (diff)
Cleanup: Libmv, clang-format
Is based on Google style which was used in the Libmv project before, but is now consistently applied for the sources of the library itself and to C-API. With some time C-API will likely be removed, and it makes it easier to make it follow Libmv style, hence the diversion from Blender's style. There are quite some exceptions (clang-format off) in the code around Eigen matrix initialization. It is rather annoying, and there could be some neat way to make initialization readable without such exception. Could be some places where loss of readability in matrix initialization got lost as the change is quite big. If this has happened it is easier to address readability once actually working on the code. This change allowed to spot some missing header guards, so that's nice. Doing it in bundled version, as the upstream library needs to have some of the recent development ported over from bundle to upstream. There should be no functional changes.
Diffstat (limited to 'intern/libmv/libmv/base/vector_utils.h')
-rw-r--r--intern/libmv/libmv/base/vector_utils.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/intern/libmv/libmv/base/vector_utils.h b/intern/libmv/libmv/base/vector_utils.h
index c71e1bea951..5f69c03d937 100644
--- a/intern/libmv/libmv/base/vector_utils.h
+++ b/intern/libmv/libmv/base/vector_utils.h
@@ -18,14 +18,13 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
-
#ifndef LIBMV_BASE_VECTOR_UTILS_H_
#define LIBMV_BASE_VECTOR_UTILS_H_
/// Delete the contents of a container.
template <class Array>
-void DeleteElements(Array *array) {
- for (int i = 0; i < array->size(); ++i) {
+void DeleteElements(Array* array) {
+ for (int i = 0; i < array->size(); ++i) {
delete (*array)[i];
}
array->clear();