aboutsummaryrefslogtreecommitdiff
path: root/src/Ewmh.cc
diff options
context:
space:
mode:
authorakir <akir>2004-10-21 10:57:38 (GMT)
committerakir <akir>2004-10-21 10:57:38 (GMT)
commit8672a337b39f2c0d4100b02a2ac046b28a395511 (patch)
tree060a373f114ca20327eacc57b65784511c2f2d9d /src/Ewmh.cc
parent4f1fbbe6e17f3d3b723a69cd7ac6a99ac58f6e66 (diff)
downloadfluxbox_pavel-8672a337b39f2c0d4100b02a2ac046b28a395511.zip
fluxbox_pavel-8672a337b39f2c0d4100b02a2ac046b28a395511.tar.bz2
fix missing 'new(nothrow)' on mipspro
Diffstat (limited to 'src/Ewmh.cc')
-rw-r--r--src/Ewmh.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc
index ce0afb5..11be04c 100644
--- a/src/Ewmh.cc
+++ b/src/Ewmh.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Ewmh.cc,v 1.52 2004/10/16 22:20:05 akir Exp $ 22// $Id: Ewmh.cc,v 1.53 2004/10/21 10:57:38 akir Exp $
23 23
24#include "Ewmh.hh" 24#include "Ewmh.hh"
25 25
@@ -35,8 +35,17 @@
35#include <iostream> 35#include <iostream>
36#include <algorithm> 36#include <algorithm>
37#include <new> 37#include <new>
38
38using namespace std; 39using namespace std;
39 40
41// mipspro has no new(nothrow)
42#if defined sgi && ! defined GCC
43#define FB_new_nothrow new
44#else
45#define FB_new_nothrow new(std::nothrow)
46#endif
47
48
40Ewmh::Ewmh() { 49Ewmh::Ewmh() {
41 createAtoms(); 50 createAtoms();
42} 51}
@@ -264,7 +273,7 @@ void Ewmh::updateClientList(BScreen &screen) {
264 num += (*icon_it)->numClients(); 273 num += (*icon_it)->numClients();
265 } 274 }
266 275
267 Window *wl = new (nothrow) Window[num]; 276 Window *wl = FB_new_nothrow Window[num];
268 if (wl == 0) { 277 if (wl == 0) {
269 _FB_USES_NLS; 278 _FB_USES_NLS;
270 cerr<<_FBTEXT(Ewmh, OutOfMemoryClientList, "Fatal: Out of memory, can't allocate for EWMH client list", "")<<endl; 279 cerr<<_FBTEXT(Ewmh, OutOfMemoryClientList, "Fatal: Out of memory, can't allocate for EWMH client list", "")<<endl;
@@ -377,6 +386,7 @@ void Ewmh::updateWorkspaceNames(BScreen &screen) {
377 386
378 for (size_t i = 0; i < number_of_desks; i++) 387 for (size_t i = 0; i < number_of_desks; i++)
379 delete [] names[i]; 388 delete [] names[i];
389
380} 390}
381 391
382void Ewmh::updateCurrentWorkspace(BScreen &screen) { 392void Ewmh::updateCurrentWorkspace(BScreen &screen) {