From eb81becdb67acbe301d6b6fd834502048fcd45e9 Mon Sep 17 00:00:00 2001 From: DrZiplok Date: Tue, 28 Dec 2010 23:31:58 +0000 Subject: [PATCH] Pure virtual classes should declare pure virtual member functions as 0, rather than having the linker go looking for implementations elesewhere. This lets the compiler generate better error messages when a subclass fails to implement one or more required functions. git-svn-id: https://arducopter.googlecode.com/svn/trunk@1339 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- libraries/AP_Compass/Compass.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/AP_Compass/Compass.h b/libraries/AP_Compass/Compass.h index 876fd9cde4..74a986b66d 100644 --- a/libraries/AP_Compass/Compass.h +++ b/libraries/AP_Compass/Compass.h @@ -15,11 +15,11 @@ class Compass float heading_y; unsigned long last_update; - virtual bool init(int initialise_wire_lib = 1); - virtual void read(); - virtual void calculate(float roll, float pitch); - virtual void set_orientation(const Matrix3f &rotation_matrix); - virtual void set_offsets(int x, int y, int z); - virtual void set_declination(float radians); + virtual bool init(int initialise_wire_lib = 1) = 0; + virtual void read() = 0; + virtual void calculate(float roll, float pitch) = 0; + virtual void set_orientation(const Matrix3f &rotation_matrix) = 0; + virtual void set_offsets(int x, int y, int z) = 0; + virtual void set_declination(float radians) = 0; }; #endif