Normalize namespaces: includes all at global/root namespace.

Should improve the quality of suggestions, etc. we get from tooling.
This commit is contained in:
Ryan Pavlik 2021-12-22 17:06:28 -06:00 committed by phkahler
parent 6d40eface2
commit a1e18b83cb
4 changed files with 22 additions and 4 deletions

View File

@ -7,6 +7,7 @@
#ifndef SOLVESPACE_GUI_H #ifndef SOLVESPACE_GUI_H
#define SOLVESPACE_GUI_H #define SOLVESPACE_GUI_H
namespace SolveSpace {
class RgbaColor; class RgbaColor;
namespace Platform { namespace Platform {
@ -386,5 +387,6 @@ void ExitGui();
void ClearGui(); void ClearGui();
} }
} // namespace SolveSpace
#endif #endif

View File

@ -7,6 +7,7 @@
#ifndef SOLVESPACE_PLATFORM_H #ifndef SOLVESPACE_PLATFORM_H
#define SOLVESPACE_PLATFORM_H #define SOLVESPACE_PLATFORM_H
namespace SolveSpace {
namespace Platform { namespace Platform {
// UTF-8 ⟷ UTF-16 conversion, for Windows. // UTF-8 ⟷ UTF-16 conversion, for Windows.
@ -80,6 +81,7 @@ void DebugPrint(const char *fmt, ...);
void *AllocTemporary(size_t size); void *AllocTemporary(size_t size);
void FreeAllTemporary(); void FreeAllTemporary();
} } // namespace Platform
} // namespace SolveSpace
#endif #endif

View File

@ -7,11 +7,23 @@
#ifndef SOLVESPACE_RESOURCE_H #ifndef SOLVESPACE_RESOURCE_H
#define SOLVESPACE_RESOURCE_H #define SOLVESPACE_RESOURCE_H
#include <functional>
#include <map>
#include <memory>
#include <stdint.h>
#include <string>
#include <vector>
namespace SolveSpace {
class Camera; class Camera;
class Point2d; class Point2d;
class Pixmap; class Pixmap;
class Vector; class Vector;
class RgbaColor; class RgbaColor;
namespace Platform {
class Path;
} // namespace Platform
std::string LoadString(const std::string &name); std::string LoadString(const std::string &name);
std::string LoadStringFromGzip(const std::string &name); std::string LoadStringFromGzip(const std::string &name);
@ -109,4 +121,5 @@ public:
const std::function<void(Vector, Vector)> &traceEdge, const Camera &camera); const std::function<void(Vector, Vector)> &traceEdge, const Camera &camera);
}; };
}
#endif #endif

View File

@ -7,6 +7,10 @@
#ifndef SOLVESPACE_H #ifndef SOLVESPACE_H
#define SOLVESPACE_H #define SOLVESPACE_H
#include "resource.h"
#include "platform/platform.h"
#include "platform/gui.h"
#include <cctype> #include <cctype>
#include <climits> #include <climits>
#include <cmath> #include <cmath>
@ -122,9 +126,6 @@ static constexpr double LENGTH_EPS = 1e-6;
static constexpr double VERY_POSITIVE = 1e10; static constexpr double VERY_POSITIVE = 1e10;
static constexpr double VERY_NEGATIVE = -1e10; static constexpr double VERY_NEGATIVE = -1e10;
#include "platform/platform.h"
#include "platform/gui.h"
#include "resource.h"
using Platform::AllocTemporary; using Platform::AllocTemporary;
using Platform::FreeAllTemporary; using Platform::FreeAllTemporary;