Collapse nested namespaces
parent
279c721373
commit
4f913eb3ad
|
@ -19,9 +19,7 @@
|
|||
#include <config.h>
|
||||
#include "cc.h"
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace compat
|
||||
namespace celestia::compat
|
||||
{
|
||||
namespace
|
||||
{
|
||||
|
@ -236,5 +234,4 @@ from_chars(const char* first, const char* last, long double &value, chars_format
|
|||
return from_chars_impl(first, last, value, fmt);
|
||||
}
|
||||
|
||||
} // end namespace compat
|
||||
} // end namespace celestia
|
||||
} // end namespace celestia::compat
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
#include <system_error>
|
||||
#include <type_traits>
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace compat
|
||||
namespace celestia::compat
|
||||
{
|
||||
#ifdef HAVE_CHARCONV
|
||||
using std::from_chars_result;
|
||||
|
@ -194,5 +192,4 @@ from_chars(const char* first, const char* last, T& value, int base)
|
|||
}
|
||||
#endif
|
||||
|
||||
} // end namespace compat
|
||||
} // end namespace celestia
|
||||
} // end namespace celestia::compat
|
||||
|
|
|
@ -4,15 +4,12 @@
|
|||
|
||||
#ifdef HAVE_FLOAT_CHARCONV
|
||||
#include <charconv>
|
||||
namespace celestia
|
||||
{
|
||||
namespace compat
|
||||
namespace celestia::compat
|
||||
{
|
||||
using std::chars_format;
|
||||
using std::from_chars_result;
|
||||
using std::from_chars;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#include "cc.h"
|
||||
#endif
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
#include "glsupport.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace gl
|
||||
namespace celestia::gl
|
||||
{
|
||||
|
||||
#ifdef GL_ES
|
||||
|
@ -75,5 +73,4 @@ bool checkVersion(int v) noexcept
|
|||
{
|
||||
return epoxy_gl_version() >= v;
|
||||
}
|
||||
} // gl
|
||||
} // celestia
|
||||
} // end namespace celestia::gl
|
||||
|
|
|
@ -29,9 +29,7 @@
|
|||
#define glDepthRange glDepthRangef
|
||||
#endif
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace gl
|
||||
namespace celestia::gl
|
||||
{
|
||||
|
||||
constexpr const int GL_2_1 = 21;
|
||||
|
@ -55,5 +53,5 @@ extern GLint maxTextureAnisotropy;
|
|||
|
||||
bool init(util::array_view<std::string> = {}) noexcept;
|
||||
bool checkVersion(int) noexcept;
|
||||
} // gl
|
||||
} // celestia
|
||||
|
||||
} // end namespace celestia::gl
|
||||
|
|
|
@ -35,9 +35,7 @@ inline void glVertexAttrib(GLuint index, const Eigen::Vector4f &v)
|
|||
glVertexAttrib4fv(index, v.data());
|
||||
}
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace vecgl
|
||||
namespace celestia::vecgl
|
||||
{
|
||||
template<typename T>
|
||||
inline Eigen::Matrix<T,4,4>
|
||||
|
@ -152,7 +150,6 @@ translate(T x, T y, T z)
|
|||
{
|
||||
return Eigen::Transform<T,3,Eigen::Affine>(Eigen::Translation<T,3>(Eigen::Matrix<T,3,1>(x,y,z))).matrix();
|
||||
}
|
||||
} // namespace vecgl
|
||||
} // namespace celestia
|
||||
} // end namespace celestia::vecgl
|
||||
|
||||
#endif // _CELENGINE_VECGL_H_
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
|
||||
#include "script.h"
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace scripts
|
||||
namespace celestia::scripts
|
||||
{
|
||||
|
||||
bool IScript::handleMouseButtonEvent(float /*x*/, float /*y*/, int /*button*/, bool /*down*/)
|
||||
|
@ -34,5 +32,4 @@ bool IScript::handleTickEvent(double /*dt*/)
|
|||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} // end namespace celestia::scripts
|
||||
|
|
|
@ -14,9 +14,7 @@
|
|||
|
||||
class CelestiaCore;
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace scripts
|
||||
namespace celestia::scripts
|
||||
{
|
||||
|
||||
class IScript
|
||||
|
@ -74,5 +72,4 @@ class IScriptHook
|
|||
CelestiaCore *m_appCore;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // end namespace celestia::scripts
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
#include <celestia/celestiacore.h>
|
||||
#include <celengine/render.h>
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace scripts
|
||||
namespace celestia::scripts
|
||||
{
|
||||
|
||||
void initRenderFlagMap(FlagMap64 &RenderFlagMap)
|
||||
|
@ -219,5 +217,4 @@ ScriptMaps::ScriptMaps()
|
|||
initLineColorMap(LineColorMap);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} // end namespace celestia::scripts
|
||||
|
|
|
@ -4,10 +4,9 @@
|
|||
#include <string>
|
||||
#include <celutil/color.h>
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace scripts
|
||||
namespace celestia::scripts
|
||||
{
|
||||
|
||||
// String to flag mappings
|
||||
typedef std::map<std::string, uint32_t> FlagMap;
|
||||
typedef std::map<std::string, uint64_t> FlagMap64;
|
||||
|
@ -32,5 +31,5 @@ class ScriptMaps
|
|||
ColorMap LineColorMap;
|
||||
ColorMap LabelColorMap;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
} // end namespace celestia::scripts
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace scripts
|
||||
namespace celestia::scripts
|
||||
{
|
||||
|
||||
// Extremely basic implementation of an ExecutionEnvironment for
|
||||
|
@ -110,4 +108,3 @@ unique_ptr<IScript> LegacyScriptPlugin::loadScript(const fs::path &path)
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,9 +16,7 @@ class Execution;
|
|||
class ExecutionEnvironment;
|
||||
class CelestiaCore;
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace scripts
|
||||
namespace celestia::scripts
|
||||
{
|
||||
|
||||
class LegacyScript : public IScript
|
||||
|
@ -54,5 +52,4 @@ class LegacyScriptPlugin : public IScriptPlugin
|
|||
std::unique_ptr<IScript> loadScript(const fs::path&) override;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // end namespace celestia::scripts
|
||||
|
|
|
@ -17,9 +17,7 @@ class CelestiaConfig;
|
|||
class CelestiaCore;
|
||||
class ProgressNotifier;
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace scripts
|
||||
namespace celestia::scripts
|
||||
{
|
||||
|
||||
class LuaScript : public IScript
|
||||
|
@ -83,5 +81,4 @@ class LuaHook : public IScriptHook
|
|||
|
||||
bool CreateLuaEnvironment(CelestiaCore *appCore, const CelestiaConfig *config, ProgressNotifier *progressNotifier = nullptr);
|
||||
|
||||
}
|
||||
}
|
||||
} // end namespace celestia::scripts
|
||||
|
|
|
@ -14,9 +14,7 @@
|
|||
#include <type_traits> // std::remove_cv
|
||||
#include <cstddef> // std::size_t
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace util
|
||||
namespace celestia::util
|
||||
{
|
||||
|
||||
/**
|
||||
|
@ -174,5 +172,5 @@ class array_view
|
|||
const element_type* m_ptr;
|
||||
size_t m_size;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
} // end namespace celestia::util
|
||||
|
|
|
@ -8,10 +8,9 @@
|
|||
#include <config.h>
|
||||
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace util
|
||||
namespace celestia::util
|
||||
{
|
||||
|
||||
/*! Read a value stored in machine-native byte order from an input stream.
|
||||
*/
|
||||
template<typename T, typename = std::enable_if_t<std::is_trivially_copyable<T>::value>>
|
||||
|
@ -120,5 +119,4 @@ inline bool readBE(std::istream& in, T& value)
|
|||
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
} // end namespace celestia::util
|
||||
|
|
|
@ -8,10 +8,9 @@
|
|||
#include <config.h>
|
||||
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace util
|
||||
namespace celestia::util
|
||||
{
|
||||
|
||||
/*! Write a value to an output stream in machine-native byte order.
|
||||
*/
|
||||
template<typename T, typename = std::enable_if_t<std::is_trivially_copyable<T>::value>>
|
||||
|
@ -111,5 +110,4 @@ inline bool writeBE(std::ostream& out, T value)
|
|||
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
} // end namespace celestia::util
|
||||
|
|
|
@ -31,9 +31,7 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace util
|
||||
namespace celestia::util
|
||||
{
|
||||
|
||||
fs::path LocaleFilename(const fs::path &p)
|
||||
|
@ -185,5 +183,4 @@ fs::path WriteableDataPath()
|
|||
}
|
||||
#endif // !PORTABLE_BUILD
|
||||
|
||||
}
|
||||
}
|
||||
} // end namespace celestia::util
|
||||
|
|
|
@ -15,10 +15,9 @@
|
|||
#include <celutil/array_view.h>
|
||||
#include <celcompat/filesystem.h>
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace util
|
||||
namespace celestia::util
|
||||
{
|
||||
|
||||
fs::path LocaleFilename(const fs::path& filename);
|
||||
fs::path PathExp(const fs::path& filename);
|
||||
fs::path ResolveWildcard(const fs::path& wildcard,
|
||||
|
@ -27,5 +26,5 @@ fs::path ResolveWildcard(const fs::path& wildcard,
|
|||
fs::path HomeDir();
|
||||
fs::path WriteableDataPath();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
} // end namespace celestia::util
|
||||
|
|
|
@ -15,9 +15,7 @@
|
|||
#include <fmt/ostream.h>
|
||||
#include "logger.h"
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace util
|
||||
namespace celestia::util
|
||||
{
|
||||
|
||||
Logger* Logger::g_logger = nullptr;
|
||||
|
@ -53,5 +51,4 @@ void Logger::vlog(Level level, fmt::string_view format, fmt::format_args args) c
|
|||
fmt::vprint(stream, format, args);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} // end namespace celestia::util
|
||||
|
|
|
@ -25,9 +25,7 @@ struct fmt::formatter<fs::path> : formatter<std::string>
|
|||
}
|
||||
};
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace util
|
||||
namespace celestia::util
|
||||
{
|
||||
|
||||
enum class Level
|
||||
|
@ -126,5 +124,5 @@ Logger* CreateLogger(Level level = Level::Info,
|
|||
Logger::Stream &log = std::clog,
|
||||
Logger::Stream &err = std::cerr);
|
||||
void DestroyLogger();
|
||||
}
|
||||
}
|
||||
|
||||
} // end namespace celestia::util
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#include "glsupport.h"
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace gl
|
||||
namespace celestia::gl
|
||||
{
|
||||
|
||||
bool ARB_shader_objects = false;
|
||||
|
@ -30,5 +28,5 @@ bool checkVersion(int v) noexcept
|
|||
{
|
||||
return epoxy_gl_version() >= v;
|
||||
}
|
||||
} // gl
|
||||
} // celestia
|
||||
|
||||
} // end namespace celestia::gl
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
#include <GL/glu.h>
|
||||
#endif
|
||||
|
||||
namespace celestia
|
||||
{
|
||||
namespace gl
|
||||
namespace celestia::gl
|
||||
{
|
||||
|
||||
constexpr const int GL_2_1 = 21;
|
||||
|
@ -23,5 +21,5 @@ extern bool EXT_framebuffer_object;
|
|||
|
||||
bool init() noexcept;
|
||||
bool checkVersion(int) noexcept;
|
||||
} // gl
|
||||
} // celestia
|
||||
|
||||
} // end namespace celestia::gl
|
||||
|
|
Loading…
Reference in New Issue