Ticket #2427: 2427.patch
File 2427.patch, 3.3 KB (added by , 10 years ago) |
---|
-
source/lib/sysdep/os/osx/dir_watch.cpp
1 /* Copyright (c) 201 3Wildfire Games1 /* Copyright (c) 2014 Wildfire Games 2 2 * 3 3 * Permission is hereby granted, free of charge, to any person obtaining 4 4 * a copy of this software and associated documentation files (the … … 188 188 { 189 189 if ( g_Stream == NULL ) 190 190 { 191 g_Stream = CreateEventStream( g_RootPaths ); 191 if (!g_RootPaths.empty()) { 192 g_Stream = CreateEventStream( g_RootPaths ); 193 } 192 194 } 193 195 else 194 196 { -
source/simulation2/system/ParamNode.cpp
1 /* Copyright (C) 201 0Wildfire Games.1 /* Copyright (C) 2014 Wildfire Games. 2 2 * This file is part of 0 A.D. 3 3 * 4 4 * 0 A.D. is free software: you can redistribute it and/or modify … … 113 113 boost::algorithm::split(newTokens, value, boost::algorithm::is_space()); 114 114 115 115 // 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 } 118 133 119 134 // Merge the two lists 120 135 std::vector<std::wstring> tokens = oldTokens; -
source/tools/atlas/AtlasUI/Misc/DLLInterface.cpp
1 /* Copyright (C) 201 2Wildfire Games.1 /* Copyright (C) 2014 Wildfire Games. 2 2 * This file is part of 0 A.D. 3 3 * 4 4 * 0 A.D. is free software: you can redistribute it and/or modify … … 51 51 // in OnFatalException), and it's never especially useful, so don't use it. 52 52 #define USE_WX_FATAL_EXCEPTION_REPORT 0 53 53 54 54 55 // Shared memory allocation functions 55 56 ATLASDLLIMPEXP void* ShareableMalloc(size_t n) 56 57 { … … 144 145 int argc = 1; 145 146 char atlas[] = "atlas"; 146 147 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 148 157 #endif 149 158 } 150 159 … … 174 183 class AtlasDLLApp : public wxApp 175 184 { 176 185 public: 177 186 virtual bool OSXIsGUIApplication() 187 { 188 return false; 189 } 178 190 virtual bool OnInit() 179 191 { 180 192 // _CrtSetBreakAlloc(5632);