Remove/replace some stdint.h includes

This commit is contained in:
Marek Roszko 2021-06-08 21:17:42 -04:00
parent ea283625a7
commit ffa87e69c6
3 changed files with 5 additions and 7 deletions

View File

@ -37,7 +37,6 @@
#define KICAD_PLUGIN_EXPORT extern "C" __attribute__((__visibility__("default"))) #define KICAD_PLUGIN_EXPORT extern "C" __attribute__((__visibility__("default")))
#endif #endif
#else #else
#include <stdint.h>
#ifndef KICAD_PLUGIN_EXPORT #ifndef KICAD_PLUGIN_EXPORT
#define KICAD_PLUGIN_EXPORT extern "C" __declspec( dllexport ) #define KICAD_PLUGIN_EXPORT extern "C" __declspec( dllexport )
#endif #endif

View File

@ -27,7 +27,7 @@
* @brief a few functions useful in geometry calculations. * @brief a few functions useful in geometry calculations.
*/ */
#include <stdint.h> // for int64_t #include <cstdint>
#include <algorithm> // for max, min #include <algorithm> // for max, min
#include <eda_rect.h> #include <eda_rect.h>
@ -142,22 +142,22 @@ bool ClipLine( const EDA_RECT *aClipBox, int &x1, int &y1, int &x2, int &y2 )
if( thisoutcode & 1 ) // Clip the bottom if( thisoutcode & 1 ) // Clip the bottom
{ {
y = aClipBox->GetBottom(); y = aClipBox->GetBottom();
x = x1 + (x2 - x1) * int64_t(y - y1) / (y2 - y1); x = x1 + (x2 - x1) * std::int64_t(y - y1) / (y2 - y1);
} }
else if( thisoutcode & 2 ) // Clip the top else if( thisoutcode & 2 ) // Clip the top
{ {
y = aClipBox->GetY(); y = aClipBox->GetY();
x = x1 + (x2 - x1) * int64_t(y - y1) / (y2 - y1); x = x1 + ( x2 - x1 ) * std::int64_t( y - y1 ) / ( y2 - y1 );
} }
else if( thisoutcode & 8 ) // Clip the right else if( thisoutcode & 8 ) // Clip the right
{ {
x = aClipBox->GetRight(); x = aClipBox->GetRight();
y = y1 + (y2 - y1) * int64_t(x - x1) / (x2 - x1); y = y1 + ( y2 - y1 ) * std::int64_t( x - x1 ) / ( x2 - x1 );
} }
else // if( thisoutcode & 4), obviously, clip the left else // if( thisoutcode & 4), obviously, clip the left
{ {
x = aClipBox->GetX(); x = aClipBox->GetX();
y = y1 + (y2 - y1) * int64_t(x - x1) / (x2 - x1); y = y1 + ( y2 - y1 ) * std::int64_t( x - x1 ) / ( x2 - x1 );
} }
// Put the result back and update the boundary code // Put the result back and update the boundary code

View File

@ -34,7 +34,6 @@
#include <pcb_base_frame.h> #include <pcb_base_frame.h>
#include <pcb_edit_frame.h> #include <pcb_edit_frame.h>
#include <project.h> #include <project.h>
#include <stdint.h>
#include <wx_html_report_panel.h> #include <wx_html_report_panel.h>
#include <frame_type.h> #include <frame_type.h>