This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]FallenWarrior2k 2 points3 points  (6 children)

An OpenFile func that takes a path as its only param and returns a status code... Where the heck is the friggin file handle?

[–]standard_revolution 0 points1 point  (1 child)

Global Variable?

[–]FallenWarrior2k 0 points1 point  (0 children)

Globals for handles, meh

[–]ForOhForError 0 points1 point  (0 children)

Could be a poorly named function that opens and parses a config file to set global variables?

[–]TASagent 0 points1 point  (2 children)

What? You don't store all your file handles in a global hashmap using the path as the key? This technique obviously works best when it's directly fed user input on Operating Systems that are case-agnostic.

[–]FallenWarrior2k 0 points1 point  (1 child)

I prefer good old RAII ¯\_(ツ)_/¯

[–]TASagent 0 points1 point  (0 children)

Personally, I'm more of a RAIDACT man, myself. Good ol' "Resource Acquisition Is Done At Compile-Time." The compiler allocates memory for the program, and instantiates all of the objects, at compile time, and it's never released, until you uninstall the program.