Replace GCC-specific attribute with [[nodiscard]] attribute (#6899)

This commit is contained in:
Dennis Luxen
2024-05-24 20:34:04 +02:00
committed by GitHub
parent 21607e0cb2
commit babdced52f
20 changed files with 98 additions and 157 deletions
+2 -2
View File
@@ -28,9 +28,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef OSRM_UTIL_ALIAS_HPP
#define OSRM_UTIL_ALIAS_HPP
#include <boost/numeric/conversion/cast.hpp>
#include <cstddef>
#include <functional>
#include <iostream>
#include <ostream>
#include <type_traits>
namespace osrm
-13
View File
@@ -1,13 +0,0 @@
#ifndef OSRM_ATTRIBUTES_HPP_
#define OSRM_ATTRIBUTES_HPP_
// OSRM_ATTR_WARN_UNUSED - caller has to use function's return value
// https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
#if defined(__GNUC__) && (__GNUC__ >= 4)
#define OSRM_ATTR_WARN_UNUSED __attribute__((warn_unused_result))
#else
#define OSRM_ATTR_WARN_UNUSED
#endif
#endif
+2 -4
View File
@@ -6,18 +6,16 @@
#include "extractor/name_table.hpp"
#include "extractor/suffix_table.hpp"
#include "util/attributes.hpp"
#include "util/typedefs.hpp"
#include <boost/algorithm/string.hpp>
#include <algorithm>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/predicate.hpp>
namespace osrm::util::guidance
{
// Name Change Logic