diff --git a/.vscode/settings.json b/.vscode/settings.json index ebb6cf3..c23026c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -76,7 +76,7 @@ "clangd.enable": true, "C_Cpp.dimInactiveRegions": false, "editor.defaultFormatter": "xaver.clang-format", - "clangd.inactiveRegions.useBackgroundHighlight": true, + "clangd.inactiveRegions.useBackgroundHighlight": false, "clangd.arguments": [ "--compile-commands-dir=${workspaceFolder}/build" ], diff --git a/src/Matrix.cpp b/src/Matrix.cpp index a7fb1a2..68e8d63 100644 --- a/src/Matrix.cpp +++ b/src/Matrix.cpp @@ -1,3 +1,10 @@ +// This #ifndef section makes clangd happy so that it can properly do type hints +// in this file +#ifndef MATRIX_H_ +#define MATRIX_H_ +#include "Matrix.hpp" +#endif + #ifdef MATRIX_H_ // since the .cpp file has to be included by the .hpp file this // will evaluate to true #include "Matrix.hpp" diff --git a/src/Matrix.hpp b/src/Matrix.hpp index 47eb5cb..7ce6940 100644 --- a/src/Matrix.hpp +++ b/src/Matrix.hpp @@ -1,5 +1,4 @@ -#ifndef MATRIX_H_ -#define MATRIX_H_ +#pragma once #include #include @@ -258,6 +257,6 @@ private: void setMatrixToArray(const std::array &array); }; +#ifndef MATRIX_H_ #include "Matrix.cpp" - #endif // MATRIX_H_ \ No newline at end of file