Why - ProfessorChill - 07-06-2018
ALE + Clang_Check likes to give you errors unless you do this.
Code: class Player {
public:
virtual ~Player() = default; // This
Player(const Player&) = default; // Shit
Player& operator=(const Player&) = default; // Right
Player(Player&&) = default; // Over
Player& operator=(Player&&) = default; // Here
explicit Player(const std::string &texturePath);
void draw(sf::RenderWindow *window);
private:
sf::Sprite sprite;
sf::Texture texture;
sf::Vector2f spritePosition;
sf::Vector2u textureSize;
};
EDIT: My indentation went poof and I'm too lazy to fix it.
RE: Why - phyrrus9 - 07-06-2018
(07-06-2018, 04:00 AM)ProfessorChill Wrote: ALE + Clang_Check likes to give you errors unless you do this.
Code: class Player {
public:
virtual ~Player() = default; // This
Player(const Player&) = default; // Shit
Player& operator=(const Player&) = default; // Right
Player(Player&&) = default; // Over
Player& operator=(Player&&) = default; // Here
explicit Player(const std::string &texturePath);
void draw(sf::RenderWindow *window);
private:
sf::Sprite sprite;
sf::Texture texture;
sf::Vector2f spritePosition;
sf::Vector2u textureSize;
};
EDIT: My indentation went poof and I'm too lazy to fix it.
gives errors unless you do what? Also, you should fix your curly braces. Every curly brace MUST have its own line, or you're a retarded programmer.
RE: Why - ProfessorChill - 07-06-2018
(07-06-2018, 04:53 AM)phyrrus9 Wrote: (07-06-2018, 04:00 AM)ProfessorChill Wrote: ALE + Clang_Check likes to give you errors unless you do this.
Code: class Player {
public:
virtual ~Player() = default; // This
Player(const Player&) = default; // Shit
Player& operator=(const Player&) = default; // Right
Player(Player&&) = default; // Over
Player& operator=(Player&&) = default; // Here
explicit Player(const std::string &texturePath);
void draw(sf::RenderWindow *window);
private:
sf::Sprite sprite;
sf::Texture texture;
sf::Vector2f spritePosition;
sf::Vector2u textureSize;
};
EDIT: My indentation went poof and I'm too lazy to fix it.
gives errors unless you do what? Also, you should fix your curly braces. Every curly brace MUST have its own line, or you're a retarded programmer.
Code: virtual ~Player() = default; // This
Player(const Player&) = default; // Shit
Player& operator=(const Player&) = default; // Right
Player(Player&&) = default; // Over
Player& operator=(Player&&) = default; // Here
Has SL gotten more toxic? This is two users who hurt my feelings 
I don't format my code because if it's a personal project I don't care what people see. If I do care I'll use this:
Code: let g:clang_format#auto_format=1
let g:clang_format#style_options = {
\ "AccessModifierOffset": -4,
\ "IndentWidth": 8,
\ "BreakBeforeBraces": "Linux",
\ "AllowShortIfStatementsOnASingleLine": "false",
\ "IndentCaseLabels": "false",
\ "UseTab": "Always"}
I'll admit, I'm not that great at C++. Actually, I did mention that, some people just don't read.
ALSO
Code: int fuck() { return 1; }
char *your() { return "formatting"; }
int cunt() { return 2; }
Fucking hell, my insult doesn't even compile (until I edit it.)
RE: Why - phyrrus9 - 07-06-2018
(07-06-2018, 04:59 AM)ProfessorChill Wrote: (07-06-2018, 04:53 AM)phyrrus9 Wrote: (07-06-2018, 04:00 AM)ProfessorChill Wrote: ALE + Clang_Check likes to give you errors unless you do this.
Code: class Player {
public:
virtual ~Player() = default; // This
Player(const Player&) = default; // Shit
Player& operator=(const Player&) = default; // Right
Player(Player&&) = default; // Over
Player& operator=(Player&&) = default; // Here
explicit Player(const std::string &texturePath);
void draw(sf::RenderWindow *window);
private:
sf::Sprite sprite;
sf::Texture texture;
sf::Vector2f spritePosition;
sf::Vector2u textureSize;
};
EDIT: My indentation went poof and I'm too lazy to fix it.
gives errors unless you do what? Also, you should fix your curly braces. Every curly brace MUST have its own line, or you're a retarded programmer.
Code: virtual ~Player() = default; // This
Player(const Player&) = default; // Shit
Player& operator=(const Player&) = default; // Right
Player(Player&&) = default; // Over
Player& operator=(Player&&) = default; // Here
Has SL gotten more toxic? This is two users who hurt my feelings 
I don't format my code because if it's a personal project I don't care what people see. If I do care I'll use this:
Code: let g:clang_format#auto_format=1
let g:clang_format#style_options = {
\ "AccessModifierOffset": -4,
\ "IndentWidth": 8,
\ "BreakBeforeBraces": "Linux",
\ "AllowShortIfStatementsOnASingleLine": "false",
\ "IndentCaseLabels": "false",
\ "UseTab": "Always"}
I'll admit, I'm not that great at C++. Actually, I did mention that, some people just don't read.
I'm not here to hurt your feelings, but I wont sugar coat my answers. Please give me more context (like a pastebin or a file) so I can compile it/read it and see whats going on.
Note: if you're being retarded, im going to tell you immediately. trust me, you'll thank me for that later. just ask @"Ender"
RE: Why - ProfessorChill - 07-06-2018
(07-06-2018, 05:01 AM)phyrrus9 Wrote: (07-06-2018, 04:59 AM)ProfessorChill Wrote: (07-06-2018, 04:53 AM)phyrrus9 Wrote: gives errors unless you do what? Also, you should fix your curly braces. Every curly brace MUST have its own line, or you're a retarded programmer.
Code: virtual ~Player() = default; // This
Player(const Player&) = default; // Shit
Player& operator=(const Player&) = default; // Right
Player(Player&&) = default; // Over
Player& operator=(Player&&) = default; // Here
Has SL gotten more toxic? This is two users who hurt my feelings 
I don't format my code because if it's a personal project I don't care what people see. If I do care I'll use this:
Code: let g:clang_format#auto_format=1
let g:clang_format#style_options = {
\ "AccessModifierOffset": -4,
\ "IndentWidth": 8,
\ "BreakBeforeBraces": "Linux",
\ "AllowShortIfStatementsOnASingleLine": "false",
\ "IndentCaseLabels": "false",
\ "UseTab": "Always"}
I'll admit, I'm not that great at C++. Actually, I did mention that, some people just don't read.
I'm not here to hurt your feelings, but I wont sugar coat my answers. Please give me more context (like a pastebin or a file) so I can compile it/read it and see whats going on.
Note: if you're being retarded, im going to tell you immediately. trust me, you'll thank me for that later. just ask @"Ender"
You know what, fuck it. It's type safe and compiles and works. I was asking a simple question. I'm sure I can find an answer when I get off my ass to search it.
It's probably simply to handle proper garbage collection since cppcoreguidelines is anal about that.
RE: Why - phyrrus9 - 07-06-2018
(07-06-2018, 05:04 AM)ProfessorChill Wrote: (07-06-2018, 05:01 AM)phyrrus9 Wrote: (07-06-2018, 04:59 AM)ProfessorChill Wrote: Code: virtual ~Player() = default; // This
Player(const Player&) = default; // Shit
Player& operator=(const Player&) = default; // Right
Player(Player&&) = default; // Over
Player& operator=(Player&&) = default; // Here
Has SL gotten more toxic? This is two users who hurt my feelings 
I don't format my code because if it's a personal project I don't care what people see. If I do care I'll use this:
Code: let g:clang_format#auto_format=1
let g:clang_format#style_options = {
\ "AccessModifierOffset": -4,
\ "IndentWidth": 8,
\ "BreakBeforeBraces": "Linux",
\ "AllowShortIfStatementsOnASingleLine": "false",
\ "IndentCaseLabels": "false",
\ "UseTab": "Always"}
I'll admit, I'm not that great at C++. Actually, I did mention that, some people just don't read.
I'm not here to hurt your feelings, but I wont sugar coat my answers. Please give me more context (like a pastebin or a file) so I can compile it/read it and see whats going on.
Note: if you're being retarded, im going to tell you immediately. trust me, you'll thank me for that later. just ask @"Ender"
You know what, fuck it. It's type safe and compiles and works. I was asking a simple question. I'm sure I can find an answer when I get off my ass to search it.
It's probably simply to handle proper garbage collection since cppcoreguidelines is anal about that.
C++ has no garbage collection. you need to manage the memory yourself, and do it vigillantly.
RE: Why - Vi-Sion - 07-06-2018
You don't have to be angry, i always wish someone could tell me how to make my code better @phyrrus9 is trying to help.
RE: Why - Percent - 07-20-2018
(07-06-2018, 03:29 PM)Vi-Sion Wrote: You don't have to be angry, i always wish someone could tell me how to make my code better @phyrrus9 is trying to help.
I agree. Criticism is a virtue.
RE: Why - Vultra - 07-20-2018
Out of curiosity, how is the process going? any luck?
|