Giter Site home page Giter Site logo

osu-api-cpp's People

Contributors

abraker95 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

osu-api-cpp's Issues

Does not work as intended when compiling with Visual Studio's Release Confguration

The data contents end up being blank.

I believe the root cause has to do something with the downloader. Upon closer examination using debugging tools, I've found that the URL is not being properly read as soon as the debugger enters download.cpp. Passing it as a string didn't help either as I am suspecting it gets lost during the typecast to a char*.

Line(s) of code suspected:
Download.cpp: 60 - 73

Use better Enums

Sugestion by Soinou (https://osu.ppy.sh/forum/p/4199805)

Instead of something like:

params[U32 PARAM:game_mode] = "something";
params[U32 PARAM:limit] = 50;

you could do:

enum Parameter
{
    kGameMode = 0,
    kLimit = 1
}

params[Parameter::kGameMode] = "something";
params[Parameter::kLimit] = 50;

And your parameters could be defined in a map<int, string> or even better, in a custom class, where your [] operator would look like:

operator[] (Parameter param)
{
    switch(param)
    {
        case Parameter::kGameMode:
            // Handle game mode setter
            break;
        case Parameter::kLimit:
            // Handle limit setter
            break;
        default:
            break;
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.