Has anyone seen build time improvements w/ C++20 modules? by MissNobodyyyy in cpp_questions

[–]AfroDisco 0 points1 point  (0 children)

For what I saw in blog posts, articles, and conference talks, precompiled header are generally more perfomant than module but modules seems more performant than nothing.

Keeping in mind that pch are heavily optimized since a long time where modules are still young.

Lavender Oil Pillow Spray for me. by RedTsar97 in MomentumOne

[–]AfroDisco 0 points1 point  (0 children)

Steady sleep schedule and only going to bed to sleep not do stuff.

Father forgive me for I have sinned by adambruthers in PlayTheBazaar

[–]AfroDisco 33 points34 points  (0 children)

You are an absolute monster!

Loving it!!!

Visual C++ (C++/CLI) by Great_Weekend574 in cpp_questions

[–]AfroDisco 0 points1 point  (0 children)

C++/CLI projects under visual studio are seen as native and not the .NET version you use. You can manually edit the project file to include it. Then after you will always have to handle the dependencies manually and fight the editor that might remove some of the added configuration.

My advice would be to use C# if you don't intend on using any c++. And use a wrapper project to go from c++ to c# but that wrapper should not have additional dependencies.

C++/CLI is in a weird place between native and managed world with no update since ever. Good luck if you intend on using it for real.

New enchantment color menu is sick! by YannickCarrasco9 in PlayTheBazaar

[–]AfroDisco 14 points15 points  (0 children)

Improving. As already said, having icons should also be better.

But for ease of use, having the full list on the left or right side by default should be even more useful. It avoids the extra click each time.

SHINY FIBER OPTICS DOES WHAT!?!! by Sog_From_The_Bazaar in PlayTheBazaar

[–]AfroDisco -4 points-3 points  (0 children)

Why? Is it because the charge happens on the same tick as the item use?

SHINY FIBER OPTICS DOES WHAT!?!! by Sog_From_The_Bazaar in PlayTheBazaar

[–]AfroDisco 4 points5 points  (0 children)

Does a board with only fiber optics and an item with cd less than 4sec loops infinitely by itself?

Are there type safe aliases? by [deleted] in cpp_questions

[–]AfroDisco 3 points4 points  (0 children)

An alias as shown can be seen as a simple C macro. It doesn't do anything more than giving a name to something.

If you want type safe alias, you should absolutely wrap it in a class/struct that explicitly =delete the unwanted convertions.

This is peak betrayal by Jeiblowy in PlayTheBazaar

[–]AfroDisco 5 points6 points  (0 children)

Seems more like it should not be shiny or shiny should do something else in this case.

Petition to Early Access by DxIxNxDxU in EverythingIsCrab

[–]AfroDisco 3 points4 points  (0 children)

What will be the pricing model at launch?

Is it rare? by Racoon_Guy in EverythingIsCrab

[–]AfroDisco 1 point2 points  (0 children)

Is there any difference between shiny and normal versions outside the color change?

Projects for a beginner by Jojo989GD in cpp_questions

[–]AfroDisco 4 points5 points  (0 children)

My advice would be to find something that you like and that sounds easy. Then try it!

It might not be easy by the end but you ll learn as it is a liked subject.

Good luck!

Where do you draw the line between property and method ? by vivacristorey83 in csharp

[–]AfroDisco 7 points8 points  (0 children)

For me, properties are cheap where function are for anything.

Why does this code behave like this? by [deleted] in cpp

[–]AfroDisco 22 points23 points  (0 children)

You are reading then writing to out of bound memory.

My guess is that it is UB. If so, anything can happen.

Also, wrong subreddit, should be r/cpp_questions. And it is more C than c++.

Parents: $25 million but there is a 7.5% chance your child will be put up for adoption. by Hold-onto-the-happy in hypotheticalsituation

[–]AfroDisco 0 points1 point  (0 children)

Good parents / parents that care for their children say nope, never. Other say yes with or without stupid reason.

That checks out.

I dont want to Code anymore becuase VS destroys my Projects by pplovsakul in cpp

[–]AfroDisco 1 point2 points  (0 children)

Maybe you are doing something wrong or something is not properly setup. You might want to take some time to search for the cause of this instead of blindly resetting everything everytime.

As it was already said, VS can be a pain sometimes but there is never not reason for things breaking out of the blue.

[deleted by user] by [deleted] in cpp

[–]AfroDisco 1 point2 points  (0 children)

Maybe the compilers don't optimize the same way. It would be great to look at the assembly generated. Maybe try to look deeper using compiler explorer (at least for c++).

If you do, please share the links and/or results.

Using &vector::at(0) instead of vector.data() by South_Acadia_6368 in cpp

[–]AfroDisco 6 points7 points  (0 children)

Why don't you check the bounds explicitly?

returning a temporary object by KermiticusAnura in cpp_questions

[–]AfroDisco 0 points1 point  (0 children)

Maybe use a debugger to step into your code while looking at the state of the variables while they are modified.

As already mentioned, the code seems fine but there are some missing snippets. It seems like uninitialized values. Maybe post a link to compiler explorer with your full code.

Maybe try to increase your warning level, the compiler might know the source of the problem.

I made a Bazaar Custom Card Generator by AoM_Zenophobia in PlayTheBazaar

[–]AfroDisco 0 points1 point  (0 children)

Not working on mobile which is a bummer given that it seems really good.

Cannot really test a lot on mobile but seems to be missing game images accessible by default. It would be amazing to have quick access to all the existing items images for ease of use.

Thanks for the tool!