[Bf-blender-cvs] [d39f5109cce] functions: add license header to blenlib files

Jacques Lucke noreply at git.blender.org
Wed Aug 14 11:53:51 CEST 2019


Commit: d39f5109ccebbc4baeaf1e0e57edc86f7b12e3ce
Author: Jacques Lucke
Date:   Wed Aug 14 11:44:11 2019 +0200
Branches: functions
https://developer.blender.org/rBd39f5109ccebbc4baeaf1e0e57edc86f7b12e3ce

add license header to blenlib files

===================================================================

M	source/blender/blenlib/BLI_array_lookup.hpp
M	source/blender/blenlib/BLI_chained_strings.hpp
M	source/blender/blenlib/BLI_lazy_init.hpp
M	source/blender/blenlib/BLI_listbase_wrapper.hpp
M	source/blender/blenlib/BLI_math.hpp
M	source/blender/blenlib/BLI_mempool.hpp
M	source/blender/blenlib/BLI_monotonic_allocator.hpp
M	source/blender/blenlib/BLI_multi_map.hpp
M	source/blender/blenlib/BLI_multi_vector.hpp
M	source/blender/blenlib/BLI_object_pool.hpp
M	source/blender/blenlib/BLI_optional.hpp
M	source/blender/blenlib/BLI_range.hpp
M	source/blender/blenlib/BLI_refcount.hpp
M	source/blender/blenlib/BLI_stack.hpp
M	source/blender/blenlib/BLI_string_ref.hpp
M	source/blender/blenlib/BLI_task.hpp
M	source/blender/blenlib/BLI_temporary_allocator.hpp
M	source/blender/blenlib/BLI_value_or_error.hpp
M	tests/gtests/blenlib/BLI_temporary_allocator_test.cc

===================================================================

diff --git a/source/blender/blenlib/BLI_array_lookup.hpp b/source/blender/blenlib/BLI_array_lookup.hpp
index a0d861148a8..6093d4b7e04 100644
--- a/source/blender/blenlib/BLI_array_lookup.hpp
+++ b/source/blender/blenlib/BLI_array_lookup.hpp
@@ -1,6 +1,23 @@
-#pragma once
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
-/* The ArrayLookup allows sharing code between a
+/** \file
+ * \ingroup bli
+ *
+ * The ArrayLookup allows sharing code between a
  * map and set implementation without hacks
  * (like using an empty value when a set is needed).
  *
@@ -8,6 +25,8 @@
  * it allows fast `contains` and `find` calls on that array.
  */
 
+#pragma once
+
 #include <cmath>
 
 #include "BLI_utildefines.h"
diff --git a/source/blender/blenlib/BLI_chained_strings.hpp b/source/blender/blenlib/BLI_chained_strings.hpp
index bd3372f2242..1ee50d87905 100644
--- a/source/blender/blenlib/BLI_chained_strings.hpp
+++ b/source/blender/blenlib/BLI_chained_strings.hpp
@@ -1,11 +1,30 @@
-#pragma once
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
-/* These classes help storing multiple strings more compactly.
+/** \file
+ * \ingroup bli
+ *
+ * These classes help storing multiple strings more compactly.
  * This should only be used when:
  *   - All strings are freed at the same time.
  *   - The length of individual strings does not change.
  *   - All string lengths are known in the beginning. */
 
+#pragma once
+
 #include "BLI_string_ref.hpp"
 #include "BLI_vector.hpp"
 
diff --git a/source/blender/blenlib/BLI_lazy_init.hpp b/source/blender/blenlib/BLI_lazy_init.hpp
index fae51f824e5..6f0541fda23 100644
--- a/source/blender/blenlib/BLI_lazy_init.hpp
+++ b/source/blender/blenlib/BLI_lazy_init.hpp
@@ -1,6 +1,23 @@
-#pragma once
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
-/* These macros help to define functions that should only be
+/** \file
+ * \ingroup bli
+ *
+ * These macros help to define functions that should only be
  * executed once to initialize some data. The initialized data
  * will only be freed when Blender quits.
  *
@@ -13,6 +30,8 @@
  *     These are destructed, after Blender prints non-freed memory blocks.
  */
 
+#pragma once
+
 #include <functional>
 #include <BLI_optional.hpp>
 
diff --git a/source/blender/blenlib/BLI_listbase_wrapper.hpp b/source/blender/blenlib/BLI_listbase_wrapper.hpp
index bd3e5478cab..fdf58d2bbf1 100644
--- a/source/blender/blenlib/BLI_listbase_wrapper.hpp
+++ b/source/blender/blenlib/BLI_listbase_wrapper.hpp
@@ -1,10 +1,29 @@
-#pragma once
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
-/* The purpose of this wrapper is just to make it more
+/** \file
+ * \ingroup bli
+ *
+ * The purpose of this wrapper is just to make it more
  * comfortable to iterate of ListBase instances, that
  * are used in many places in Blender.
  */
 
+#pragma once
+
 #include "BLI_listbase.h"
 #include "DNA_listBase.h"
 
diff --git a/source/blender/blenlib/BLI_math.hpp b/source/blender/blenlib/BLI_math.hpp
index 6161d031c89..02fab2f2962 100644
--- a/source/blender/blenlib/BLI_math.hpp
+++ b/source/blender/blenlib/BLI_math.hpp
@@ -1,3 +1,26 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/** \file
+ * \ingroup bli
+ *
+ * This file provides multiple small structs that make working with e.g. vectors in c++ code
+ * easier.
+ */
+
 #pragma once
 
 #include <array>
diff --git a/source/blender/blenlib/BLI_mempool.hpp b/source/blender/blenlib/BLI_mempool.hpp
index 5cbc839ba6c..4737406576c 100644
--- a/source/blender/blenlib/BLI_mempool.hpp
+++ b/source/blender/blenlib/BLI_mempool.hpp
@@ -1,6 +1,23 @@
-#pragma once
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
-/* Use this memory allocator when:
+/** \file
+ * \ingroup bli
+ *
+ * Use this memory allocator when:
  *   - all allocations have the same size
  *   - only a single thread allocates from this allocator
  *   - all allocated memory should be returned to the system at once
@@ -16,9 +33,10 @@
  * allocate: O(1) amortized
  * deallocate: O(1)
  * internal allocations: O(lg n) where n is the number of allocations
- *
  */
 
+#pragma once
+
 #include "BLI_stack.hpp"
 #include "BLI_set.hpp"
 
diff --git a/source/blender/blenlib/BLI_monotonic_allocator.hpp b/source/blender/blenlib/BLI_monotonic_allocator.hpp
index e67573dab03..13d327993d1 100644
--- a/source/blender/blenlib/BLI_monotonic_allocator.hpp
+++ b/source/blender/blenlib/BLI_monotonic_allocator.hpp
@@ -1,11 +1,29 @@
-#pragma once
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
 
-/**
+/** \file
+ * \ingroup bli
+ *
  * A monotonic allocator is the simplest form of an allocator. It never reuses any memory, and
  * therefore does not need a deallocation method. It simply hands out consecutive buffers of
  * memory. When the current buffer is full, it reallocates a new larger buffer and continues.
  */
 
+#pragma once
+
 #include "BLI_vector.hpp"
 
 namespace BLI {
diff --git a/source/blender/blenlib/BLI_multi_map.hpp b/source/blender/blenlib/BLI_multi_map.hpp
index ddd8904361e..df71e0b390e 100644
--- a/source/blender/blenlib/BLI_multi_map.hpp
+++ b/source/blender/blenlib/BLI_multi_map.hpp
@@ -1,6 +1,26 @@
-#pragma once
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later versi

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list