You should be able to solve this

You should be able to solve this.

Other urls found in this thread:

google.cl/search?q=is american a language
microsoft.com/en-us/legal/intellectualproperty/trademarks/en-us.aspx
twitter.com/NSFWRedditImage

thighfuck is the answer

>sublime text

>dereferencing a reference
uh
japan pls

>sublime text
0/10

Why do nips not code in japanese?

Computer science is imperialism and probably fascist too.

The same reason why germans don't code in german. Most programming languages are based on english.

debuf might be a typedef to a pointer type?

Real Germans use Plankalkül.

Because America invented computers, and other languages can fuck off or do it our way.

Programs written in japanese would be a lot slower, since the computer would need to decipher the moonrunes before doing anything.

That is not how that even remotely works. Even for interpreted languages.

>C++

Found the mistake.

At least they use VS.
Not shit like Vim or Emacs

I want to literally be Nene

Why is C++ always this complicated?

can't outsource if they're lazy
the notes are in moon anyway
the notes are pretty much what the code is listed as

outside of that image nips do still use romaji
aka still use baka/sensei/kusogaijin for code instead of literal moon

what's so complicated about that code?

>comments in moon runes

I never personally understood why Ruby as a language is entirely in English. I guess, if all the languages the inventor originally used were in English, he would then go on to make another that follows those conventions?

That iterator is fine, though? I imagine it's much worse the check for health

Not even the nips would use Ruby if it used japnaese

Old languages like C++ often end up kitchen sink of features and ideas. Which often results in multiple conflicting ways how to solve a problem.

>const auto&
Just why? Wasn't auto already a shortcut introduced to make declarations shorter? And all you're trying to achieve is a for loop.

>I imagine it's much worse the check for health

Yeah calling DestroyMe multiple times is definitely what caused the crash

>NeneEngine

cute

by the way, are those subs any good?

I've held off on watching till good subs come out

Programming languages with most support are created by Americans or western countries with American as their base language.

>C++
Wrong

C++11+

[2nd] subs are passable
Not significantly worse than whatever CR is going to shit out anyway

I'm guessing DestroyMe destroys the object where the loop is currently running in, meaning referencing m_debufs is a UAF

literally nothing wrong with this

That distinction is retarded. That's like saying "it's not Python, it's Python 3.6!"

>American language

C++ is old and many things are deprecated in the newest iteration.

As of right now, if you're trying to learn C++, you don't go for the old C++ basics book. You got for the C++17 books.

The distinction between python and python 3.X is absolutely necessary too. As the calls are very different and break between python 2 and 3.

You expected "british"? heh, kid. Brits are just a tiny country with no power right now in either culture, economy, or military.

>float sourceDamage
>auto resolvedDamage = sourceDamage
Is this acceptable in industry

Doesn't look like it. There's no `return` afterwards, so unless DestroyMe throws an exception, it would keep looping and call DestoryMe again. (I'm rusty on my C++, I can't remember if the method signature would specify exceptions or not, like in Java/Scala/Kotlin).
That, or every function inside DestroyMe, like the death animation playing, could be guarded against repeat calls, but that just seems like shit programming.

C++11 is a lot nicer. Looser templating restrictions and static assert alone make things much nicer in a real code base.

Because the popular coding languages were made in english. They could create their own language in japanese but it's just easier and more efficient to learn a few english words and code with an already established language.

>Why do nips not code in japanese?
Programming languages are not actually english, they are programming languages. It's easily possible to learn programming without speaking english. The programming language doesn't follow the grammatical rules of english, it just borrows some words, and I guess it would be easier to learn if you know these words, but otherwise they're not related.

>british language

Nips did, it's called Ruby.

How would you solve that? Set a boolean=true in the loop and resolve it afterwards?

Do you expect some "colour" variable so you can lime up your game limey?

I havent done C++ in a while, but there's a bit of optimization "trick" that you can do in Lua, where if you make a local copy of a variable, it speeds up the operation so you don't have to call the variable from outside over and over, and can instead rely on the local variable copy.

I had my suspicions too when I saw that line, I don't exactly know the reason for doing that in C++, I assume its just odd thing that some programmers are taught.

google.cl/search?q=is american a language

>blocks your path

if i watch new game will i achieve satori?

>0 health insta deletes without giving an opportunity for a death animation/effect
This is some amateur hour bullshit.

Someone translate the moonrune comments, we need to tear those apart

C++ compilers are generally able to detect those kinds of optimizations on their own. This resembles a pattern I use when I know I am going to add additional processing before something, I create a variable to store the "result" of the as of yet non-existent processing. Then, later, when I add it, I don't have to update the names used later.

>Masshirosoft

>tfw you dislike using C

So you're saying that [2nd] uses the same dead memes as CR? Or are you just talking out of your ass?

Isn't playing a death animation part of DestroyMe()?

Read the next function bellow, DestroyMe() obviously plays a death animation.

>where if you make a local copy of a variable, it speeds up the operation so you don't have to call the variable from outside over and over
Non-reference arguments in C++ are passed by value, aka a copy of the original.

If anything, it's for the ease of reading and debugging. They could've written that up as
>m_currentHealth -= debuf->applyToDamage(sourceDamage);
but why the fuck would anyone willfully write spaghetti in a language that's already painful to read to begin with.

you see a lot of the same seemingly inefficient code in enterprise -- doing one operation per statement. You'll thank yourself for the clarity when you have to inevitably debug it months later.

Wait, never mind. DestroyMe is just a retarded, misleading function name. They don't completely fail at making games.

I'm pretty sure 2nd took the machine translation of 1st and heavily edited it to actually make sense

I was just commenting on the shittiness of CR subs in general

>every_country_in_the_world_belongs_to_america.jpeg

>chink comments
lol fuck you

I'm envious because others in this thread speak computer and I don't.

>spaniard thinks he knows the difference between the american and british languages
I studied linguistics on Sup Forums, guess I'm superior to you kid.

I work with software from a German company, whenever you go deep into the code all the documentation is suddenly in fucking German, it's very intimidating

No, programming is terrible and you should be thankful that it all appears as arcane wizardy to you.

>//TODO: Need to make a death animation!

I do wonder whether or not usage of the auto type speeds up the process.

If the sourceDamage is float value, nothing changes. If its integer value, it could very well save bit of computation time (not much on modern computers, but on ancient computers, theres quite a difference in float vs int).

So its possible there could be some inherent performance use.

Now whether or not auto actually does the conversion from 10.0000 -> 10 or not, I have no idea.

Why would you keep a local copy of a compound object when you can just have a reference to it?

You say that like it isn't

const auto& is a very good change to C++, it allows you to reference objects directly without worrying about the types of objects you might work with.

And without having to worry about changing them.

auto& if you want to modify.

Integers and float/doubles are represented differently in binary. auto will never ever ever typecast primitives for you.

>m_currentHealth -= debuf->applyToDamage(sourceDamage);
>spaghetti
Literally the only thing wrong is the shitty function name.

>calling destroyme multiple times on the same object

Nene a dumdum

Because it's easier and english is very simple
Lua is a programming language created in Brazil, yet it's written in enlish

God fucking damn it, America is so amazing. Especially since it now has a President who actually gives a shit about the country.

...

Look, they either actively insert stupid fucking memes or they don't.

Can you imagine C++ in Danish?

References were always a part of C++ since time immemorial. auto is the more recent addition.

The main point of using a reference in that contest is that debuf is an object of unknown size. C++ WILL give you a local copy of that entire thing without hesitation if you don't declare it as a constant reference.

>This thread

...

That's not a destructor call. A forced destructor call would look different, and it's inadvisable to do so anyway.

It would technically work if it were a call to the object factory to mark it for deletion. However, there's still no need to put it in that loop and check it multiple times (as the code stands now). It's not catastrophic, just sloppy and misleading.

Does she like me or not?

Well yeah.

The point wasn't about reference call but about the reference calls with auto feature that saves lot a issue when dealing with multiple types.

Code is written in English, industry standard.

>comments in moon
Holy fuck. You get fired and blacklisted with shit like that in my country.

Programming languages aren't really in "english". The keywords might be english words but you still need to learn what they mean conceptually to a computer.

But majority of standard libraries use english.

That 'if' statement should be outside the loop.

>// TODO
I guarantee you that after many releases this TODO part is not done at all.

>blacklisting
A bit too harsh, don't you think?

>not using C#
Get with the times, Grandpa

>programmers are all nips
>local nip company creating games for local nips
I don't see why they won't use nihonggo.
Unless they have developers abroad too.

That TODO is
>//TODO: Make death animations!

So yeah, 36 months in Early Access until those show up.

>// Calculation of damage when attacked
>// Apply debuff
>// Destroy!
>// Play if there's death motion
>// TODO: Create death motion!

Every developer ever.

hence why english is important for coding. Shitty naming == garbage code

Ironically Visual C++ is also a trademarked term. microsoft.com/en-us/legal/intellectualproperty/trademarks/en-us.aspx

Nene isn't managing her memory properly!

Nene will soon get a gun and shoot up the office.

Pray that Nene will not have to do multi-threading so that we may all live.

Why doesn't she turn to functional programming and avoid side effects?

The loop should close after the line where debuffs are applied to the resolved damage you fucktards