mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-09 20:08:57 +03:00
Code styling pass
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
#pragma once
|
||||
#include "Core.h"
|
||||
#include "String.h"
|
||||
|
||||
#include <string>
|
||||
#include <filesystem>
|
||||
#include "Core.h"
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include "String.h"
|
||||
|
||||
namespace Nuake
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "Input.h"
|
||||
#include "../Window.h"
|
||||
#include "src/Window.h"
|
||||
|
||||
#include <Imgui/imgui_impl_glfw.h>
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#pragma once
|
||||
#include <utility>
|
||||
#include "../Core/Maths.h"
|
||||
#include "src/Core/Maths.h"
|
||||
|
||||
#include <map>
|
||||
#include <utility>
|
||||
|
||||
struct GLFWwindow;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "Logger.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
#include <string>
|
||||
@@ -6,7 +7,7 @@
|
||||
|
||||
namespace Nuake
|
||||
{
|
||||
std::vector<LogEntry> Logger::m_Logs = std::vector<LogEntry>();
|
||||
std::vector<LogEntry> Logger::m_Logs = std::vector<LogEntry>();
|
||||
|
||||
void Logger::Log(const std::string& log, LOG_TYPE type)
|
||||
{
|
||||
|
||||
@@ -20,11 +20,12 @@ namespace Nuake
|
||||
|
||||
class Logger
|
||||
{
|
||||
public:
|
||||
static void Log(const std::string& log, LOG_TYPE type = VERBOSE);
|
||||
static std::vector<LogEntry> GetLogs();
|
||||
private:
|
||||
static const int MAX_LOG = 64;
|
||||
static std::vector<LogEntry> m_Logs;
|
||||
|
||||
public:
|
||||
static void Log(const std::string& log, LOG_TYPE type = VERBOSE);
|
||||
static std::vector<LogEntry> GetLogs();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,11 +2,14 @@
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
namespace Nuake {
|
||||
namespace Nuake
|
||||
{
|
||||
bool String::BeginsWith(const std::string& string, const std::string& begin)
|
||||
{
|
||||
if (string.rfind(begin, 0) == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -14,9 +17,11 @@ namespace Nuake {
|
||||
bool String::EndsWith(const std::string& string, const std::string& end)
|
||||
{
|
||||
if (string.length() >= end.length())
|
||||
{
|
||||
return (0 == string.compare(string.length() - end.length(), end.length(), end));
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<std::string> String::Split(const std::string& string, char delimiter)
|
||||
|
||||
@@ -6,8 +6,10 @@
|
||||
This class purpose is to provide helper methods related to strings.
|
||||
It is not meant to be a replacement for std::string.
|
||||
*/
|
||||
namespace Nuake {
|
||||
class String {
|
||||
namespace Nuake
|
||||
{
|
||||
class String
|
||||
{
|
||||
public:
|
||||
static bool BeginsWith(const std::string& string, const std::string& begin);
|
||||
static bool EndsWith(const std::string& string, const std::string& end);
|
||||
|
||||
Reference in New Issue
Block a user