Ticket #2427: 2427.patch

File 2427.patch, 3.3 KB (added by trompetin17, 10 years ago)

FIXED

  • source/lib/sysdep/os/osx/dir_watch.cpp

     
    1 /* Copyright (c) 2013 Wildfire Games
     1/* Copyright (c) 2014 Wildfire Games
    22 *
    33 * Permission is hereby granted, free of charge, to any person obtaining
    44 * a copy of this software and associated documentation files (the
     
    188188{
    189189  if ( g_Stream == NULL )
    190190  {
    191     g_Stream = CreateEventStream( g_RootPaths );   
     191    if (!g_RootPaths.empty()) {
     192      g_Stream = CreateEventStream( g_RootPaths );
     193    }
    192194  }
    193195  else
    194196  {
  • source/simulation2/system/ParamNode.cpp

     
    1 /* Copyright (C) 2010 Wildfire Games.
     1/* Copyright (C) 2014 Wildfire Games.
    22 * This file is part of 0 A.D.
    33 *
    44 * 0 A.D. is free software: you can redistribute it and/or modify
     
    113113                boost::algorithm::split(newTokens, value, boost::algorithm::is_space());
    114114
    115115                // Delete empty tokens
    116                 oldTokens.erase(std::remove_if(oldTokens.begin(), oldTokens.end(), std::mem_fun_ref(&std::wstring::empty)), oldTokens.end());
    117                 newTokens.erase(std::remove_if(newTokens.begin(), newTokens.end(), std::mem_fun_ref(&std::wstring::empty)), newTokens.end());
     116                std::vector<std::wstring>::iterator it = oldTokens.begin();
     117                while (it != oldTokens.end()) {
     118                    if (it->empty()) {
     119                        it = oldTokens.erase(it);
     120                    } else {
     121                        ++it;
     122                    }
     123                }
     124               
     125                it = newTokens.begin();
     126                while (it != newTokens.end()) {
     127                    if (it->size() == 0) {
     128                        it = newTokens.erase(it);
     129                    } else {
     130                        ++it;
     131                    }
     132                }
    118133
    119134                // Merge the two lists
    120135                std::vector<std::wstring> tokens = oldTokens;
  • source/tools/atlas/AtlasUI/Misc/DLLInterface.cpp

     
    1 /* Copyright (C) 2012 Wildfire Games.
     1/* Copyright (C) 2014 Wildfire Games.
    22 * This file is part of 0 A.D.
    33 *
    44 * 0 A.D. is free software: you can redistribute it and/or modify
     
    5151// in OnFatalException), and it's never especially useful, so don't use it.
    5252#define USE_WX_FATAL_EXCEPTION_REPORT 0
    5353
     54
    5455// Shared memory allocation functions
    5556ATLASDLLIMPEXP void* ShareableMalloc(size_t n)
    5657{
     
    144145    int argc = 1;
    145146    char atlas[] = "atlas";
    146147    char *argv[] = {atlas, NULL};
    147     wxEntry(argc, argv);
     148   
     149    wxEntryStart(argc, argv);
     150    wxTheApp->OnInit();
     151   
     152    wxTheApp->OnRun();
     153    wxTheApp->OnExit();
     154   
     155    wxEntryCleanup();
     156   
    148157#endif
    149158}
    150159
     
    174183class AtlasDLLApp : public wxApp
    175184{
    176185public:
    177 
     186    virtual bool OSXIsGUIApplication()
     187    {
     188        return false;
     189    }
    178190    virtual bool OnInit()
    179191    {
    180192//      _CrtSetBreakAlloc(5632);