Skip to content

Commit

Permalink
fix: cleaned up clang warnings
Browse files Browse the repository at this point in the history
fix: stopped using reserved identifiers for include guards
feat: added various units of radiometry & unit tests
  • Loading branch information
nholthaus committed Dec 22, 2024
1 parent e4fe1ea commit fc8bd7d
Show file tree
Hide file tree
Showing 50 changed files with 1,546 additions and 1,073 deletions.
14 changes: 11 additions & 3 deletions include/units.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@

#pragma once

#ifndef units_h__
#define units_h__
#ifndef units_h_
#define units_h_

#include <units/acceleration.h>
#include <units/angle.h>
Expand All @@ -61,11 +61,13 @@
#include <units/data_transfer_rate.h>
#include <units/density.h>
#include <units/energy.h>
#include <units/energy_density.h>
#include <units/force.h>
#include <units/frequency.h>
#include <units/illuminance.h>
#include <units/impedance.h>
#include <units/inductance.h>
#include <units/irradiance.h>
#include <units/jerk.h>
#include <units/length.h>
#include <units/luminance.h>
Expand All @@ -76,8 +78,14 @@
#include <units/mass.h>
#include <units/power.h>
#include <units/pressure.h>
#include <units/radiance.h>
#include <units/radiant_intensity.h>
#include <units/radiation.h>
#include <units/solid_angle.h>
#include <units/spectral_flux.h>
#include <units/spectral_intensity.h>
#include <units/spectral_irradiance.h>
#include <units/spectral_radiance.h>
#include <units/substance.h>
#include <units/substance_concentration.h>
#include <units/substance_mass.h>
Expand Down Expand Up @@ -138,4 +146,4 @@ namespace units
} // namespace constants
} // end namespace units

#endif // units_h__
#endif // units_h_
6 changes: 3 additions & 3 deletions include/units/acceleration.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

#pragma once

#ifndef units_acceleration_h__
#define units_acceleration_h__
#ifndef units_acceleration_h_
#define units_acceleration_h_

#include <units/length.h>
#include <units/time.h>
Expand All @@ -67,4 +67,4 @@ namespace units
UNIT_ADD_DIMENSION_TRAIT(acceleration)
} // namespace units

#endif // units_acceleration_h__
#endif // units_acceleration_h_
6 changes: 3 additions & 3 deletions include/units/angle.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

#pragma once

#ifndef units_angle_h__
#define units_angle_h__
#ifndef units_angle_h_
#define units_angle_h_

#include <units/core.h>

Expand Down Expand Up @@ -273,4 +273,4 @@ namespace units
}
} // namespace units

#endif // units_angle_h__
#endif // units_angle_h_
8 changes: 4 additions & 4 deletions include/units/angular_velocity.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

#pragma once

#ifndef units_angular_velocity_h__
#define units_angular_velocity_h__
#ifndef units_angular_velocity_h_
#define units_angular_velocity_h_

#include <units/angle.h>
#include <units/time.h>
Expand All @@ -55,7 +55,7 @@ namespace units
* @namespace units::angular_velocity
* @brief namespace for unit types and containers representing angular velocity values
* @details The SI unit for angular velocity is `radians_per_second`, and the corresponding `dimension`
*dimension is `angular_velocity_unit`.
* dimension is `angular_velocity_unit`.
* @anchor angularVelocityContainers
* @sa See unit for more information on unit type containers.
*/
Expand All @@ -68,4 +68,4 @@ namespace units
UNIT_ADD_DIMENSION_TRAIT(angular_velocity)
} // namespace units

#endif // units_angular_velocity_h__
#endif // units_angular_velocity_h_
6 changes: 3 additions & 3 deletions include/units/area.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

#pragma once

#ifndef units_area_h__
#define units_area_h__
#ifndef units_area_h_
#define units_area_h_

#include <units/length.h>

Expand All @@ -69,4 +69,4 @@ namespace units
UNIT_ADD_DIMENSION_TRAIT(area)
} // namespace units

#endif // units_area_h__
#endif // units_area_h_
4 changes: 2 additions & 2 deletions include/units/capacitance.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

#pragma once

#ifndef units_capacitance_h__
#ifndef units_capacitance_h_
#define units_capacitance_h__

#include <units/core.h>
Expand All @@ -63,4 +63,4 @@ namespace units
UNIT_ADD_DIMENSION_TRAIT(capacitance)
} // namespace units

#endif // units_capacitance_h__
#endif // units_capacitance_h__
6 changes: 3 additions & 3 deletions include/units/charge.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

#pragma once

#ifndef units_charge_h__
#define units_charge_h__
#ifndef units_charge_h_
#define units_charge_h_

#include <units/current.h>
#include <units/time.h>
Expand All @@ -65,4 +65,4 @@ namespace units
UNIT_ADD_DIMENSION_TRAIT(charge)
} // namespace units

#endif // units_charge_h__
#endif // units_charge_h_
6 changes: 3 additions & 3 deletions include/units/concentration.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

#pragma once

#ifndef units_concentration_h__
#define units_concentration_h__
#ifndef units_concentration_h_
#define units_concentration_h_

#include <units/core.h>

Expand All @@ -66,4 +66,4 @@ namespace units
UNIT_ADD_DIMENSION_TRAIT(concentration)
} // namespace units

#endif // units_concentration_h__
#endif // units_concentration_h_
6 changes: 3 additions & 3 deletions include/units/conductance.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

#pragma once

#ifndef units_conductance_h__
#define units_conductance_h__
#ifndef units_conductance_h_
#define units_conductance_h_

#include <units/core.h>

Expand All @@ -67,4 +67,4 @@ namespace units
UNIT_ADD_DIMENSION_TRAIT(conductance)
} // namespace units

#endif // units_conductance_h__
#endif // units_conductance_h_
Loading

0 comments on commit fc8bd7d

Please sign in to comment.