Skip to content

Instantly share code, notes, and snippets.

View window.patch
diff --git a/RenderSystems/GL/src/OSX/OgreOSXCocoaWindow.mm b/RenderSystems/GL/src/OSX/OgreOSXCocoaWindow.mm
index 3956f21..47e41f0 100644
--- a/RenderSystems/GL/src/OSX/OgreOSXCocoaWindow.mm
+++ b/RenderSystems/GL/src/OSX/OgreOSXCocoaWindow.mm
@@ -290,6 +290,7 @@ namespace Ogre {
}
mWindow = [mView window];
+ [mWindow retain];
View rviz_moc.diff
diff --git a/src/image_view/image_view.h b/src/image_view/image_view.h
index 36a621f..411b2e1 100644
--- a/src/image_view/image_view.h
+++ b/src/image_view/image_view.h
@@ -27,27 +27,26 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#ifndef Q_MOC_RUN // See: https://bugreports.qt-project.org/browse/QTBUG-22829
+# include "rviz/ogre_helpers/qt_ogre_render_window.h"
@hgaiser
hgaiser / tautological_null.patch
Last active Sep 29, 2015
Removes tautological null checks in mongodb.
View tautological_null.patch
diff --git a/src/mongo/client/dbclientcursor.h b/src/mongo/client/dbclientcursor.h
index 785734d..11b6349 100644
--- a/src/mongo/client/dbclientcursor.h
+++ b/src/mongo/client/dbclientcursor.h
@@ -116,7 +116,7 @@ namespace mongo {
'dead' may be preset yet some data still queued and locally
available from the dbclientcursor.
*/
- bool isDead() const { return !this || cursorId == 0; }
+ bool isDead() const { return cursorId == 0; }
View mongodb_remove_htonll.patch
diff --git a/src/third_party/s2/util/endian/endian.h b/src/third_party/s2/util/endian/endian.h
index 9def73f..5b90e0a 100755
--- a/src/third_party/s2/util/endian/endian.h
+++ b/src/third_party/s2/util/endian/endian.h
@@ -178,14 +178,10 @@ class LittleEndian {
};
-// This one is safe to take as it's an extension
-#define htonll(x) ghtonll(x)
View mongodb_pointer.patch
diff --git a/src/third_party/s2/s2regioncoverer.cc b/src/third_party/s2/s2regioncoverer.cc
index fb1cb2a..e6eb797 100644
--- a/src/third_party/s2/s2regioncoverer.cc
+++ b/src/third_party/s2/s2regioncoverer.cc
@@ -113,7 +113,7 @@ S2RegionCoverer::Candidate* S2RegionCoverer::NewCandidate(S2Cell const& cell) {
size += sizeof(Candidate*) << max_children_shift();
}
Candidate* candidate = static_cast<Candidate*>(malloc(size));
- memset(candidate, 0, size);
+ memset((void *)candidate, 0, size);
@hgaiser
hgaiser / mongo_abs.patch
Last active Sep 30, 2015
Modifes abs of mongodb to use std::abs
View mongo_abs.patch
diff --git a/src/third_party/s2/util/math/mathutil.h b/src/third_party/s2/util/math/mathutil.h
index 0515912..8750b57 100755
--- a/src/third_party/s2/util/math/mathutil.h
+++ b/src/third_party/s2/util/math/mathutil.h
@@ -150,8 +150,8 @@ class MathUtil {
// Discriminants below kTolerance in absolute value are considered zero
// because changing the final bit of one of the inputs can change the
// sign of the discriminant.
- const double kTolerance = epsilon * max(fabs(2 * b * b), fabs(4 * a * c));
- return (fabs(discriminant) <= kTolerance);
View swap.patch
diff --git a/src/mongo/shell/linenoise_utf8.h b/src/mongo/shell/linenoise_utf8.h
index cb41822..29ecfff 100644
--- a/src/mongo/shell/linenoise_utf8.h
+++ b/src/mongo/shell/linenoise_utf8.h
@@ -17,6 +17,7 @@
#include <boost/smart_ptr/scoped_array.hpp>
#include <string.h>
+#include <algorithm>
@hgaiser
hgaiser / ogre.patch
Created Nov 6, 2013
Patch to fix Ogre 1.7.4 on OSX 10.9
View ogre.patch
diff --git a/RenderSystems/GL/src/OSX/OgreOSXCocoaWindow.mm b/RenderSystems/GL/src/OSX/OgreOSXCocoaWindow.mm
index 00803e7..f55a213 100644
--- a/RenderSystems/GL/src/OSX/OgreOSXCocoaWindow.mm
+++ b/RenderSystems/GL/src/OSX/OgreOSXCocoaWindow.mm
@@ -100,7 +100,7 @@ namespace Ogre {
NSString *windowTitle = [NSString stringWithCString:name.c_str() encoding:NSUTF8StringEncoding];
int winx = 0, winy = 0;
int depth = 32;
- NameValuePairList::const_iterator opt(NULL);
+ NameValuePairList::const_iterator opt;
@hgaiser
hgaiser / train.prototxt
Last active Sep 8, 2016
ResNet50-mnc3stage.prototxt
View train.prototxt
name: "ResNet50"
layer {
name: 'input-data'
type: 'Python'
top: 'data'
top: 'im_info'
top: 'gt_boxes'
top: 'gt_masks'
top: 'mask_info'
python_param {
@hgaiser
hgaiser / train.prototxt
Last active Sep 8, 2016
ResNet50 mnc5stage train
View train.prototxt
name: "ResNet50"
layer {
name: 'input-data'
type: 'Python'
top: 'data'
top: 'im_info'
top: 'gt_boxes'
top: 'gt_masks'
top: 'mask_info'
python_param {