Commit graph

53 commits

Author SHA1 Message Date
Yonas Habteab
91c7e60df8 Replace all existing copyright headers with SPDX headers
I've used the following command to replace the original copyright header
lines in a C-style comment block:

```
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f -exec perl -pi -e 's{/\*[^*]*\(\s*c\s*\)\s*(\d{4})\s*Icinga\s+GmbH[^*]*\*/}{// SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com>\n// SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
```

For files that use shell-style comments (#) like CMakeLists.txt, I've
used this command:

```
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f -exec perl -pi -e 's{#.*\(\s*c\s*\)\s(\d{4})\sIcinga\s+GmbH.*}{# SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com>\n# SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
```

And for SQL files:

```
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f \( -name '*.sql' \) -exec perl -pi -e 's{--.*\(c\)\s(\d{4})\sIcinga\sGmbH.*}{-- SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com>\n-- SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f \( -name '*.sql' \) -exec perl -pi -e 's{-- Copyright \(c\)\s(\d{4})\sIcinga\s+Development\sTeam.*}{-- SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com>\n-- SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
```
2026-02-04 14:00:05 +01:00
Yonas Habteab
3e9292a349 Value: Add a specialized rvalue reference of Get()
The move `String(Value&&)` constructor tries to partially move `String`
values from a `Value` type. However, since there was no an appropriate
`Value::Get<T>()` implementation that binds to the requested move
operation, the compiler will actually not move the value but copy it
instead as the only available implementation of `Value::Get<T>()`
returns a const reference `const T&`. This commit adds a new overload
that returns a non-const reference and allows to optionally move the string
value of a Value type.
2025-03-07 10:16:31 +01:00
Alexander A. Klimov
09160ea9eb Make icinga::Empty constant to prevent accidental changes 2024-11-11 16:31:04 +01:00
Michael Friedrich
d14a88235d Replace Copyright header with a short version, part I
CLion -> replace in path
2019-02-25 14:48:22 +01:00
Michael Friedrich
dab53448bc icinga.com: Update *.{h,c}pp 2018-10-18 09:27:04 +02:00
Gunnar Beutner
94e6be1a65 Remove unused includes 2018-01-22 09:52:29 +01:00
Gunnar Beutner
91c256261a Apply clang-tidy fix 'modernize-use-default-member-init' 2018-01-04 12:24:58 +01:00
Gunnar Beutner
e3ad0be769 Apply clang-tidy fix 'modernize-use-auto' 2018-01-04 12:24:57 +01:00
Gunnar Beutner
ac155d1dda Apply clang-tidy fix 'modernize-redundant-void-arg' 2018-01-04 12:24:57 +01:00
Gunnar Beutner
fe8572d75b Remove inline methods and use explicit template instantiation to minimize the number of weak symbols 2018-01-03 11:04:58 +01:00
Gunnar Beutner
90496b5456 Build libraries as static libraries 2018-01-02 23:29:48 +01:00
Michael Insel
158ae2188e Change copyright header for 2018 2018-01-02 12:08:55 +01:00
Jean Flach
f40f366e9e Remove unnecessary inline statements
fixes #5886
2017-12-20 13:22:38 +01:00
Gunnar Beutner
1ad83886ac Replace a few more NULLs with nullptr 2017-12-14 15:37:20 +01:00
Gunnar Beutner
42744fde5b Remove extraneous whitespace 2017-12-14 08:50:09 +01:00
Gunnar Beutner
325e4a2fb9 Use nullptr instead of <Type>::Ptr() 2017-11-30 17:47:09 +01:00
Michael Friedrich
b7caf0820d Ensure that *.icinga.com is used everywhere
fixes #13897
fixes #13277
2017-01-10 17:19:12 +01:00
Gunnar Beutner
02442ff36f Remove unused Value::GetPtr method
refs #12619
2016-09-01 15:26:25 +02:00
Gunnar Beutner
54f0cb2c2c Add another rvalue constructor to the String class
refs #12555
2016-08-31 13:27:59 +02:00
Gunnar Beutner
ed72112d4b Remove even more unnecessary copies
refs #12509
2016-08-27 20:37:25 +02:00
Gunnar Beutner
ef50c57ed0 Make VS 2013 happy
refs #12555
2016-08-27 20:07:48 +02:00
Gunnar Beutner
f1cac2f20a Fix compatibility with boost <= 1.53
refs #12555
2016-08-27 12:43:56 +02:00
Gunnar Beutner
00eec13338 Avoid unnecessary string copies in the JSON encoder
refs #12509
2016-08-27 11:47:36 +02:00
Gunnar Beutner
170c3624e3 Use 'default' for move constructors
refs #12555
2016-08-27 11:39:08 +02:00
Gunnar Beutner
56ba6089d0 Add rvalue support for the Array and Dictionary classes
refs #12555
2016-08-27 07:42:28 +02:00
Gunnar Beutner
c1a58446af Add another rvalue constructor for the Value class
refs #12555
2016-08-26 18:11:28 +02:00
Gunnar Beutner
4f46e59af3 Implement an rvalue constructor for the String and Value classes
fixes #12555
2016-08-26 09:11:36 +02:00
Gunnar Beutner
39bde8078c Disallow casting "" to an Object
fixes #12390
2016-08-10 11:14:33 +02:00
Gunnar Beutner
e3f1c1ec6f Make sure timestamps are formatted as integers in macro strings
refs #11483
2016-06-21 11:29:12 +02:00
Gunnar Beutner
d2cd4b6667 Improve performance for locks and value conversions
refs #11612
2016-04-19 09:38:22 +02:00
Gunnar Beutner
796884343b Another build fix for Win64
refs #11462
2016-03-29 08:42:02 +02:00
Gunnar Beutner
599929b0f6 Update copyright headers for 2016 2016-01-12 08:29:59 +01:00
Gunnar Beutner
ff59402a10 Remove unnecessary check in Value::IsObject
refs #10199
2015-09-23 10:48:49 +02:00
Michael Friedrich
428be72bab Implement Object#clone and rename Array/Dictionary#clone to shallow_clone
fixes #9931
2015-08-17 13:59:49 +02:00
Michael Friedrich
d7970f5bb1 Implement modified attributes v2
refs #9081
refs #9093
2015-08-15 20:07:10 +02:00
Gunnar Beutner
4d25a2cb22 Implement the assignment operator for the Value class 2015-03-02 12:55:48 +01:00
Michael Friedrich
78bfd0204c Update copyright year 2015-01-22 12:00:23 +01:00
Gunnar Beutner
1ddab493e1 Make sure that Value::IsEmpty() returns true for empty strings
fixes #8018
2014-12-20 09:31:55 +01:00
Gunnar Beutner
6fddec0dd3 Improve error message for invalid field accesses
fixes #8079
2014-12-20 09:17:02 +01:00
Gunnar Beutner
23a556c7ce Make sure that operator % throws an exception when the ride-hand-side argument is 0
fixes #8089
2014-12-16 08:52:32 +01:00
Gunnar Beutner
aa38dde1fc Implement prototype functions
fixes #8065
2014-12-12 15:22:37 +01:00
Gunnar Beutner
89a0fc006e Implement a boolean sub-type for the Value class
fixes #8043
2014-12-10 09:05:16 +01:00
Gunnar Beutner
ca75584d88 Allow String class members to be inlined 2014-11-11 23:46:06 +01:00
Gunnar Beutner
36d108528f Allow Value class members to be inlined 2014-11-11 23:28:53 +01:00
Gunnar Beutner
478f03b49a Replace boost::shared_ptr with boost::intrusive_ptr
refs #7622
2014-11-09 16:54:41 +01:00
Gunnar Beutner
e1c95d4fa0 Improve config compiler's memory usage 2014-11-08 13:21:51 +01:00
Gunnar Beutner
064407d3c9 Fix dynamic_cast problem
fixes #7586
2014-11-06 09:05:12 +01:00
Gunnar Beutner
9e16e1d395 Remove some obsolete references to cJSON
refs #7452
2014-11-05 16:47:11 +01:00
Gunnar Beutner
cfc418c9eb Fix operator shared_ptr<T> for the Value class
fixes #7586
2014-11-05 16:09:22 +01:00
Gunnar Beutner
6f160eda47 Remove static_cast optimization for Value's operator shared_ptr<T> 2014-10-31 14:34:28 +01:00