chevron_left chevron_right
Login Register invert_colors photo_library
Thread Rating:
  • 0 Vote(s) - 0 Average


filter_list Why
Author
Message
Why #1
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.
(This post was last modified: 07-06-2018, 04:01 AM by ProfessorChill.)

Reply

RE: Why #2
(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.

Reply

RE: Why #3
(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 Sad

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.)
(This post was last modified: 07-06-2018, 05:02 AM by ProfessorChill.)

Reply

RE: Why #4
(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 Sad

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

Reply

RE: Why #5
(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 Sad

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.

Reply

RE: Why #6
(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 Sad

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.

Reply

RE: Why #7
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.


Everyone should learn how to code, it teaches you how to think.

You don't have to be a Genius to know how to code you just need to be determined.

The computer is incredibly fast, accurate, and stupid; man is unbelievably slow, inaccurate, and brilliant; together they are powerful beyond imagination.

Reply

RE: Why #8
(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.

Reply

RE: Why #9
Out of curiosity, how is the process going? any luck?

Reply






Users browsing this thread: 1 Guest(s)